summaryrefslogtreecommitdiffstats
path: root/clang/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
commit00deddb6d8a0e620fd164c5439317f7752da4639 (patch)
tree81350865a5c88117c0345e138bc451c072a9414a /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent68a62d67f3d1105787006f746c35762b4cdc9713 (diff)
downloadbcm5719-llvm-00deddb6d8a0e620fd164c5439317f7752da4639.tar.gz
bcm5719-llvm-00deddb6d8a0e620fd164c5439317f7752da4639.zip
[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. llvm-svn: 185444
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index e9dda5ceeab..888963359b4 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud