diff options
author | Anna Zaks <ganna@apple.com> | 2011-11-01 22:41:09 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-11-01 22:41:09 +0000 |
commit | 6889679d72859960e0fc8d1080487f63c4df1e0a (patch) | |
tree | 29d678238722214906dabc35bdb6adf22d312b0a /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | cdcc653642d4ac9255c574fabe74a48149e06733 (diff) |
[analyzer] Make sure the child builder use temporary destination sets
The parent and child builders should not share node sets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 3924154f6f..9973b7765c 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -432,11 +432,12 @@ void ExprEngine::ProcessTemporaryDtor(const CFGTemporaryDtor D, ExplodedNodeSet &Dst) {} void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, - ExplodedNodeSet &Dst) { + ExplodedNodeSet &DstTop) { PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(), S->getLocStart(), "Error evaluating statement"); - StmtNodeBuilder Bldr(Pred, Dst, *currentBuilderContext); + ExplodedNodeSet Dst; + StmtNodeBuilder Bldr(Pred, DstTop, *currentBuilderContext); // Expressions to ignore. if (const Expr *Ex = dyn_cast<Expr>(S)) @@ -1283,9 +1284,10 @@ void ExprEngine::VisitLvalArraySubscriptExpr(const ArraySubscriptExpr *A, /// VisitMemberExpr - Transfer function for member expressions. void ExprEngine::VisitMemberExpr(const MemberExpr *M, ExplodedNode *Pred, - ExplodedNodeSet &Dst) { + ExplodedNodeSet &TopDst) { - StmtNodeBuilder Bldr(Pred, Dst, *currentBuilderContext); + StmtNodeBuilder Bldr(Pred, TopDst, *currentBuilderContext); + ExplodedNodeSet Dst; Decl *member = M->getMemberDecl(); if (VarDecl *VD = dyn_cast<VarDecl>(member)) { assert(M->isLValue()); |