From 8ba4e12ec18b71a40d735bc4773cbe142be0b1d9 Mon Sep 17 00:00:00 2001
From: Davide Italiano <davide@freebsd.org>
Date: Thu, 1 Jun 2017 23:55:18 +0000
Subject: [PATCH] [CodeGen] Surround assertion with parentheses.

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index d604b4130a2..f9d1fe46874 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -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)) {
-- 
GitLab