From 7f9b1d963d4b7e2faff7305733e3453130b402fe Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 21 Feb 2012 00:46:29 +0000 Subject: Have ScanReachableSymbols reported reachable regions. Fixes a false positive with nested array literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151012 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/ProgramState.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/StaticAnalyzer/Core/ProgramState.cpp') diff --git a/lib/StaticAnalyzer/Core/ProgramState.cpp b/lib/StaticAnalyzer/Core/ProgramState.cpp index 6f39c0321e..b9cfa27808 100644 --- a/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -553,6 +553,10 @@ bool ScanReachableSymbols::scan(const MemRegion *R) { if (isVisited) return true; isVisited = 1; + + + if (!visitor.VisitMemRegion(R)) + return false; // If this is a symbolic region, visit the symbol for the region. if (const SymbolicRegion *SR = dyn_cast(R)) -- cgit v1.2.3