]> granicus.if.org Git - clang/commitdiff
Add braces to avoid an ambiguous else, fixing a GCC warning.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 20 Jun 2010 10:20:36 +0000 (10:20 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 20 Jun 2010 10:20:36 +0000 (10:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106403 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/SimpleSValuator.cpp

index fe82276faa5a0fae690ea2132dafa1eb3a348d50..0799380e80f213b0ec1a9e8bd51e9350cb279a8d 100644 (file)
@@ -278,11 +278,11 @@ SVal SimpleSValuator::MakeSymIntVal(const SymExpr *LHS,
 
   // Idempotent ops (like a*1) can still change the type of an expression.
   // Wrap the LHS up in a NonLoc again and let EvalCastNL do the dirty work.
-  if (isIdempotent)
+  if (isIdempotent) {
     if (SymbolRef LHSSym = dyn_cast<SymbolData>(LHS))
       return EvalCastNL(nonloc::SymbolVal(LHSSym), resultTy);
-    else
-      return EvalCastNL(nonloc::SymExprVal(LHS), resultTy);
+    return EvalCastNL(nonloc::SymExprVal(LHS), resultTy);
+  }
 
   // If we reach this point, the expression cannot be simplified.
   // Make a SymExprVal for the entire thing.