diff options
| author | Anna Zaks <ganna@apple.com> | 2013-04-20 01:15:42 +0000 |
|---|---|---|
| committer | Anna Zaks <ganna@apple.com> | 2013-04-20 01:15:42 +0000 |
| commit | 6c0c47ede56e38568f69261b28858b3d1faa9c92 (patch) | |
| tree | 0c3f5b39a1a7856bf1398c8429698c00f6ead022 /clang/lib/StaticAnalyzer/Core/ProgramState.cpp | |
| parent | 390fb10a9ba759022c5cc57393f83124945a937f (diff) | |
| download | bcm5719-llvm-6c0c47ede56e38568f69261b28858b3d1faa9c92.tar.gz bcm5719-llvm-6c0c47ede56e38568f69261b28858b3d1faa9c92.zip | |
[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.
llvm-svn: 179916
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ProgramState.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/ProgramState.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp index 4b857b0ac24..5c54e2f112a 100644 --- a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/clang/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(); |

