From ff80afcfb2b00ccffcb6cb10528bec565fc59edd Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Fri, 24 Feb 2012 16:49:46 +0000 Subject: [analyzer] Run remove dead bindings before each call. This ensures that we report the bugs associated with symbols going out of scope in the correct function context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151369 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/ExprEngine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp') diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index a61c0272b5..3cf07feadb 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -230,7 +230,11 @@ static bool shouldRemoveDeadBindings(AnalysisManager &AMgr, // Is this on a non-expression? if (!isa(S.getStmt())) return true; - + + // Run before processing a call. + if (isa(S.getStmt())) + return true; + // Is this an expression that is consumed by another expression? If so, // postpone cleaning out the state. ParentMap &PM = LC->getAnalysisDeclContext()->getParentMap(); -- cgit v1.2.3