diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-30 19:53:37 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-30 19:53:37 +0000 |
commit | 93e71455e932fb6436a154e2c805395558b7d54c (patch) | |
tree | 541b06902cec6a4bc245e3c44487ec8925a142f4 /lib/Analysis/BugReporter.cpp | |
parent | 380022d9072ebc3b2b1050098be6da8de4d03e0e (diff) |
Simplify more code by using SVal::getAsSymbol().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index a240062ef7..36515870b8 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -635,17 +635,12 @@ public: bool HandleBinding(StoreManager& SMgr, Store store, const MemRegion* R, SVal V) { - 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 + + SymbolRef ScanSym = V.getAsSymbol(); + + if (!ScanSym) return true; - assert (ScanSym); - if (!BR.isNotable(ScanSym)) return true; |