]> granicus.if.org Git - clang/commitdiff
[CodeGen] Surround assertion with parentheses.
authorDavide Italiano <davide@freebsd.org>
Thu, 1 Jun 2017 23:55:18 +0000 (23:55 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 1 Jun 2017 23:55:18 +0000 (23:55 +0000)
This should placate GCC's -Wparentheses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304499 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprScalar.cpp

index d604b4130a230cd5a95abc7569cf984e88475902..f9d1fe468748f230acc667418008354919b2c52b 100644 (file)
@@ -3887,7 +3887,7 @@ Value *CodeGenFunction::EmitCheckedInBoundsGEP(Value *Ptr,
   /// Return the result of the given binary operation.
   auto eval = [&](BinaryOperator::Opcode Opcode, llvm::Value *LHS,
                   llvm::Value *RHS) -> llvm::Value * {
-    assert(Opcode == BO_Add || Opcode == BO_Mul && "Can't eval binop");
+    assert((Opcode == BO_Add || Opcode == BO_Mul) && "Can't eval binop");
 
     // If the operands are constants, return a constant result.
     if (auto *LHSCI = dyn_cast<llvm::ConstantInt>(LHS)) {