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/ExprEngineObjC.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/ExprEngineObjC.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp index 853b1961442..b5ceb64fabf 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp @@ -113,7 +113,7 @@ void ExprEngine::VisitObjCForCollectionStmt(const ObjCForCollectionStmt *S, QualType T = R->getValueType(); assert(Loc::isLocType(T)); unsigned Count = currentBuilderContext->getCurrentBlockCount(); - SymbolRef Sym = SymMgr.getConjuredSymbol(elem, T, Count); + SymbolRef Sym = SymMgr.getConjuredSymbol(elem, LCtx, T, Count); SVal V = svalBuilder.makeLoc(Sym); hasElems = hasElems->bindLoc(elementV, V); @@ -255,7 +255,8 @@ void ExprEngine::evalObjCMessage(StmtNodeBuilder &Bldr, QualType ResultTy = msg.getResultType(getContext()); unsigned Count = currentBuilderContext->getCurrentBlockCount(); const Expr *CurrentE = cast<Expr>(currentStmt); - ReturnValue = SVB.getConjuredSymbolVal(NULL, CurrentE, ResultTy, Count); + const LocationContext *LCtx = Pred->getLocationContext(); + ReturnValue = SVB.getConjuredSymbolVal(NULL, CurrentE, LCtx, ResultTy, Count); } // Bind the return value. |