summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/BasicConstraintManager.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-02-05 06:57:29 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-02-05 06:57:29 +0000
commit9103df1688c3fdd3b2b85bffc026c0f3a07e38b4 (patch)
treedbbf6758c4fe155e2be6f8364a9d82c9c7aa2038 /clang/lib/Analysis/BasicConstraintManager.cpp
parent7e1d2862ca99296f6bc0e09fc5e1e814ddc648a2 (diff)
downloadbcm5719-llvm-9103df1688c3fdd3b2b85bffc026c0f3a07e38b4.tar.gz
bcm5719-llvm-9103df1688c3fdd3b2b85bffc026c0f3a07e38b4.zip
Make SymbolicRegion subclass TypedRegion, for symbols usually have types, so
do the symblic regions associated with them and we need them to be typed. Current SymbolicRegion::getRValueType() method is very restricting. It may be modified when we are more clear about what could be the types of symblic regions. BasicConstraintManager::Assume() is changed due to that now SymblicRegion is a subclass of SubRegion. llvm-svn: 63844
Diffstat (limited to 'clang/lib/Analysis/BasicConstraintManager.cpp')
-rw-r--r--clang/lib/Analysis/BasicConstraintManager.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/clang/lib/Analysis/BasicConstraintManager.cpp b/clang/lib/Analysis/BasicConstraintManager.cpp
index 0c98bf64502..58c4727d51e 100644
--- a/clang/lib/Analysis/BasicConstraintManager.cpp
+++ b/clang/lib/Analysis/BasicConstraintManager.cpp
@@ -165,17 +165,14 @@ const GRState* BasicConstraintManager::AssumeAux(const GRState* St, Loc Cond,
// FIXME: Should this go into the storemanager?
const MemRegion* R = cast<loc::MemRegionVal>(Cond).getRegion();
-
- while (R) {
- if (const SubRegion* SubR = dyn_cast<SubRegion>(R)) {
- R = SubR->getSuperRegion();
- continue;
- }
- else if (const SymbolicRegion* SymR = dyn_cast<SymbolicRegion>(R))
+ const SubRegion* SubR = dyn_cast<SubRegion>(R);
+
+ while (SubR) {
+ // FIXME: now we only find the first symbolic region.
+ if (const SymbolicRegion* SymR = dyn_cast<SymbolicRegion>(SubR))
return AssumeAux(St, loc::SymbolVal(SymR->getSymbol()), Assumption,
isFeasible);
-
- break;
+ SubR = dyn_cast<SubRegion>(SubR->getSuperRegion());
}
// FALL-THROUGH.
OpenPOWER on IntegriCloud