diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-30 18:39:15 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-30 18:39:15 +0000 |
commit | 0297ee06ad4e4770628a7bff136d17147509ec6a (patch) | |
tree | 15a254c47950246ab0ff2ae0e35bbd4af6887e7b /lib/Analysis/BugReporter.cpp | |
parent | f3929daf7f2223913e226686cd4078a73849057c (diff) |
Convert use of loc::SymbolVal and nonloc::SymbolVal to V.getAsSymbol(). This
also makes this code more correct as it transparently handles SVals that wrapped
TypedViewRegions(SymbolicRegions).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index f5ba3275b9..a240062ef7 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -537,18 +537,11 @@ public: PathDiagnostic& pd, BugReporter& br) : Sym(sym), PrevSt(prevst), S(s), VMgr(vmgr), Pred(pred), PD(pd), BR(br) {} - bool HandleBinding(StoreManager& SMgr, Store store, - const MemRegion* R, SVal V) { + bool HandleBinding(StoreManager& SMgr, Store store, const MemRegion* R, + SVal V) { + + SymbolRef ScanSym = V.getAsSymbol(); - SymbolRef ScanSym = 0; - - if (loc::SymbolVal* SV = dyn_cast<loc::SymbolVal>(&V)) - ScanSym = SV->getSymbol(); - else if (nonloc::SymbolVal* SV = dyn_cast<nonloc::SymbolVal>(&V)) - ScanSym = SV->getSymbol(); - else - return true; - if (ScanSym != Sym) return true; |