r304499 - [CodeGen] Surround assertion with parentheses.

Davide Italiano via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 1 16:55:18 PDT 2017


Author: davide
Date: Thu Jun  1 18:55:18 2017
New Revision: 304499

URL: http://llvm.org/viewvc/llvm-project?rev=304499&view=rev
Log:
[CodeGen] Surround assertion with parentheses.

This should placate GCC's -Wparentheses.

Modified:
    cfe/trunk/lib/CodeGen/CGExprScalar.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=304499&r1=304498&r2=304499&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Thu Jun  1 18:55:18 2017
@@ -3887,7 +3887,7 @@ Value *CodeGenFunction::EmitCheckedInBou
   /// 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)) {




More information about the cfe-commits mailing list