[cfe-commits] r68048 - /cfe/trunk/lib/Analysis/BugReporter.cpp
Ted Kremenek
kremenek at apple.com
Mon Mar 30 11:39:15 PDT 2009
Author: kremenek
Date: Mon Mar 30 13:39:15 2009
New Revision: 68048
URL: http://llvm.org/viewvc/llvm-project?rev=68048&view=rev
Log:
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).
Modified:
cfe/trunk/lib/Analysis/BugReporter.cpp
Modified: cfe/trunk/lib/Analysis/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BugReporter.cpp?rev=68048&r1=68047&r2=68048&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/BugReporter.cpp (original)
+++ cfe/trunk/lib/Analysis/BugReporter.cpp Mon Mar 30 13:39:15 2009
@@ -537,18 +537,11 @@
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;
More information about the cfe-commits
mailing list