r296246 - Fix -Wparentheses warning

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 24 22:47:00 PST 2017


Author: vedantk
Date: Sat Feb 25 00:47:00 2017
New Revision: 296246

URL: http://llvm.org/viewvc/llvm-project?rev=296246&view=rev
Log:
Fix -Wparentheses warning

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=296246&r1=296245&r2=296246&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Sat Feb 25 00:47:00 2017
@@ -81,8 +81,8 @@ static bool IsWidenedIntegerOp(const AST
 
 /// Check if we can skip the overflow check for \p Op.
 static bool CanElideOverflowCheck(const ASTContext &Ctx, const BinOpInfo &Op) {
-  assert(isa<UnaryOperator>(Op.E) ||
-         isa<BinaryOperator>(Op.E) && "Expected a unary or binary operator");
+  assert((isa<UnaryOperator>(Op.E) || isa<BinaryOperator>(Op.E)) &&
+         "Expected a unary or binary operator");
 
   if (const auto *UO = dyn_cast<UnaryOperator>(Op.E))
     return IsWidenedIntegerOp(Ctx, UO->getSubExpr());




More information about the cfe-commits mailing list