summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-08-09 21:24:02 +0000
committerJordan Rose <jordan_rose@apple.com>2012-08-09 21:24:02 +0000
commit996d309fb7d40a46ad6099290550393a9ad7c0a3 (patch)
tree8fbc9363450bab20b14187273fa4a5b7a9a69e3f /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent656b5a0937ef75e512c68dfb13a7c25dfebaa1a4 (diff)
downloadbcm5719-llvm-996d309fb7d40a46ad6099290550393a9ad7c0a3.tar.gz
bcm5719-llvm-996d309fb7d40a46ad6099290550393a9ad7c0a3.zip
[analyzer] A CXXBaseObjectRegion should correspond to a DIRECT base.
An ASTContext's RecordLayoutInfo can only be used to look up offsets of direct base classes, and we need the offset to make non-symbolic bindings in RegionStore. This change makes sure that we have one layer of CXXBaseObjectRegion for each base we are casting through. This was causing crashes on an internal buildbot. llvm-svn: 161621
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 7ec151ef6d7..46cba81b14f 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -318,7 +318,7 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
ProgramStateRef state = Pred->getState();
const LocationContext *LCtx = Pred->getLocationContext();
SVal val = state->getSVal(Ex, LCtx);
- val = getStoreManager().evalDerivedToBase(val, T);
+ val = getStoreManager().evalDerivedToBase(val, CastE);
state = state->BindExpr(CastE, LCtx, val);
Bldr.generateNode(CastE, Pred, state);
continue;
OpenPOWER on IntegriCloud