summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-07-02 16:50:24 +0000
committerJordan Rose <jordan_rose@apple.com>2013-07-02 16:50:24 +0000
commit330231537010ab1d77affcbcaffd4bbe358b4cfa (patch)
tree43100d93f591bdf0617ed30fd0d33da1509eb157 /lib/StaticAnalyzer/Core/ExprEngineC.cpp
parentce9cd911c5b88d375ea1ff9f4719e4d63ce0fa7a (diff)
downloadclang-330231537010ab1d77affcbcaffd4bbe358b4cfa.tar.gz
clang-330231537010ab1d77affcbcaffd4bbe358b4cfa.tar.bz2
clang-330231537010ab1d77affcbcaffd4bbe358b4cfa.tar.xz
[analyzer] Pointers-to-members are (currently) Locs, not NonLocs.
While we don't model pointers-to-members besides "null" and "non-null", we were using Loc symbols for valid pointers and NonLoc integers for the null case. This hit the assert committed in r185401. Fixed by using a true (Loc) null for null member pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index e9dda5ceea..888963359b 100644
--- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -371,7 +371,7 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
}
case CK_NullToMemberPointer: {
// FIXME: For now, member pointers are represented by void *.
- SVal V = svalBuilder.makeIntValWithPtrWidth(0, true);
+ SVal V = svalBuilder.makeNull();
state = state->BindExpr(CastE, LCtx, V);
Bldr.generateNode(CastE, Pred, state);
continue;