diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-06-30 20:24:11 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-06-30 20:24:11 +0000 |
commit | 8fd187986d029047cf77caa82c8a73d7c6c4dba5 (patch) | |
tree | 0383bdf611f2c0b57864854871262332e2dfd3ac | |
parent | 3423e72b55570b8ffe09c280867669a59c4bcb8e (diff) | |
download | bcm5719-llvm-8fd187986d029047cf77caa82c8a73d7c6c4dba5.tar.gz bcm5719-llvm-8fd187986d029047cf77caa82c8a73d7c6c4dba5.zip |
Combine two conditional branches into one. No functionality change.
llvm-svn: 74552
-rw-r--r-- | clang/lib/Analysis/BasicStore.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/Analysis/BasicStore.cpp b/clang/lib/Analysis/BasicStore.cpp index 56cf799943e..d96ef5b948c 100644 --- a/clang/lib/Analysis/BasicStore.cpp +++ b/clang/lib/Analysis/BasicStore.cpp @@ -216,16 +216,11 @@ SVal BasicStoreManager::getLValueElement(const GRState *state, return Base; } - - if (const TypedRegion *TR = dyn_cast<TypedRegion>(R)) { - BaseR = TR; + if (isa<TypedRegion>(R) || isa<SymbolicRegion>(R)) { + BaseR = R; break; } - if (const SymbolicRegion* SR = dyn_cast<SymbolicRegion>(R)) { - BaseR = SR; - } - break; } @@ -241,9 +236,10 @@ SVal BasicStoreManager::getLValueElement(const GRState *state, return Base; } - if (BaseR) + if (BaseR) { return ValMgr.makeLoc(MRMgr.getElementRegion(elementType, UnknownVal(), BaseR, getContext())); + } else return UnknownVal(); } |