diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-02-17 23:13:45 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-02-17 23:13:45 +0000 |
commit | d519cae8aa275870b1d26013396b5e4f7462946a (patch) | |
tree | 2955f62b5e6fe95522fb2927a47bb23595d42a74 /clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | |
parent | 81e2bf2b778ef3f74152cf559bedd264461f41ff (diff) | |
download | bcm5719-llvm-d519cae8aa275870b1d26013396b5e4f7462946a.tar.gz bcm5719-llvm-d519cae8aa275870b1d26013396b5e4f7462946a.zip |
Have conjured symbols depend on LocationContext, to add context sensitivity for functions called more than once.
llvm-svn: 150849
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp index 7a5cb877772..45f8cee9100 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp @@ -251,8 +251,9 @@ void ExprEngine::VisitCXXNewExpr(const CXXNewExpr *CNE, ExplodedNode *Pred, StmtNodeBuilder Bldr(Pred, Dst, *currentBuilderContext); unsigned blockCount = currentBuilderContext->getCurrentBlockCount(); + const LocationContext *LCtx = Pred->getLocationContext(); DefinedOrUnknownSVal symVal = - svalBuilder.getConjuredSymbolVal(NULL, CNE, CNE->getType(), blockCount); + svalBuilder.getConjuredSymbolVal(NULL, CNE, LCtx, CNE->getType(), blockCount); const MemRegion *NewReg = cast<loc::MemRegionVal>(symVal).getRegion(); QualType ObjTy = CNE->getType()->getAs<PointerType>()->getPointeeType(); const ElementRegion *EleReg = |