analyzer infrastructure: make a bunch of changes to symbolic expressions that
Zhongxing and I discussed by email.
Main changes:
- Removed SymIntConstraintVal and SymIntConstraint
- Added SymExpr as a parent class to SymbolData, SymSymExpr, SymIntExpr
- Added nonloc::SymExprVal to wrap SymExpr
- SymbolRef is now just a typedef of 'const SymbolData*'
- Bunch of minor code cleanups in how some methods were invoked (no functionality change)
This changes are part of a long-term plan to have full symbolic expression
trees. This will be useful for lazily evaluating complicated expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67731 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index ffa1593..6807c9f 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -443,7 +443,7 @@
bool HandleBinding(StoreManager& SMgr, Store store,
const MemRegion* R, SVal V) {
- SymbolRef ScanSym;
+ SymbolRef ScanSym = 0;
if (loc::SymbolVal* SV = dyn_cast<loc::SymbolVal>(&V))
ScanSym = SV->getSymbol();
@@ -545,7 +545,7 @@
bool HandleBinding(StoreManager& SMgr, Store store,
const MemRegion* R, SVal V) {
- SymbolRef ScanSym;
+ SymbolRef ScanSym = 0;
if (loc::SymbolVal* SV = dyn_cast<loc::SymbolVal>(&V))
ScanSym = SV->getSymbol();
@@ -554,7 +554,7 @@
else
return true;
- assert (ScanSym.isValid());
+ assert (ScanSym);
if (!BR.isNotable(ScanSym))
return true;