From 8ef064d53fb33b5a8f8743bcbb0a2fd5c3e97be1 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Sat, 20 Apr 2013 01:15:42 +0000 Subject: [analyzer] Ensure BugReporterTracking works on regions with pointer arithmetic Introduce a new helper function, which computes the first symbolic region in the base region chain. The corresponding symbol has been used for assuming that a pointer is null. Now, it will also be used for checking if it is null. This ensures that we are tracking a null pointer correctly in the BugReporter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179916 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/ProgramState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/StaticAnalyzer/Core/ProgramState.cpp') diff --git a/lib/StaticAnalyzer/Core/ProgramState.cpp b/lib/StaticAnalyzer/Core/ProgramState.cpp index 4b857b0ac2..5c54e2f112 100644 --- a/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -383,7 +383,7 @@ ConditionTruthVal ProgramState::isNull(SVal V) const { if (V.isConstant()) return false; - SymbolRef Sym = V.getAsSymbol(); + SymbolRef Sym = V.getAsSymbol(/* IncludeBaseRegion */ true); if (!Sym) return ConditionTruthVal(); -- cgit v1.2.3-18-g5258