forked from OSchip/llvm-project
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). llvm-svn: 68048
This commit is contained in:
parent
7a78f3abd3
commit
a53eb7fa80
|
@ -537,17 +537,10 @@ public:
|
||||||
PathDiagnostic& pd, BugReporter& br)
|
PathDiagnostic& pd, BugReporter& br)
|
||||||
: Sym(sym), PrevSt(prevst), S(s), VMgr(vmgr), Pred(pred), PD(pd), BR(br) {}
|
: Sym(sym), PrevSt(prevst), S(s), VMgr(vmgr), Pred(pred), PD(pd), BR(br) {}
|
||||||
|
|
||||||
bool HandleBinding(StoreManager& SMgr, Store store,
|
bool HandleBinding(StoreManager& SMgr, Store store, const MemRegion* R,
|
||||||
const MemRegion* R, SVal V) {
|
SVal V) {
|
||||||
|
|
||||||
SymbolRef ScanSym = 0;
|
SymbolRef ScanSym = V.getAsSymbol();
|
||||||
|
|
||||||
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)
|
if (ScanSym != Sym)
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue