]> granicus.if.org Git - clang/commitdiff
Simplify some code. No functionality change.
authorZhongxing Xu <xuzhongxing@gmail.com>
Thu, 26 Mar 2009 08:40:37 +0000 (08:40 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Thu, 26 Mar 2009 08:40:37 +0000 (08:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67748 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRSimpleVals.cpp

index 3bd51ecd72cb569c29d067e4c2d1361efb5ab4db..a38d76d2608049d129139947270aea6729d94565 100644 (file)
@@ -231,22 +231,10 @@ SVal GRSimpleVals::DetermEvalBinOpNN(GRExprEngine& Eng,
         }
         
       case nonloc::SymbolValKind:
-        if (isa<nonloc::ConcreteInt>(R)) {
-          if (Op >= BinaryOperator::LT && Op <= BinaryOperator::NE) {
-            const SymIntExpr *SE =
-              Eng.getSymbolManager().getSymIntExpr(
-                                     cast<nonloc::SymbolVal>(L).getSymbol(), Op,
-                                     cast<nonloc::ConcreteInt>(R).getValue(),T);
-
-            
-            return nonloc::SymExprVal(SE);
-          } else {
-            return NonLoc::MakeVal(Eng.getSymbolManager(),
-                                   cast<nonloc::SymbolVal>(L).getSymbol(),
-                                   Op, cast<nonloc::ConcreteInt>(R).getValue(),
-                                   T);
-          }
-        }
+        if (isa<nonloc::ConcreteInt>(R))
+          return NonLoc::MakeVal(Eng.getSymbolManager(),
+                                 cast<nonloc::SymbolVal>(L).getSymbol(), Op,
+                                 cast<nonloc::ConcreteInt>(R).getValue(), T);
         else
           return UnknownVal();
     }