]> granicus.if.org Git - clang/commitdiff
Combine two conditional branches into one. No functionality change.
authorTed Kremenek <kremenek@apple.com>
Tue, 30 Jun 2009 20:24:11 +0000 (20:24 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 30 Jun 2009 20:24:11 +0000 (20:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74552 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicStore.cpp

index 56cf799943e0b978a93657c8fabacb00a9f70c78..d96ef5b948c7ec630df6ce61b4dc043a5d8c897d 100644 (file)
@@ -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();
 }