From: Mikael Holmen Date: Wed, 10 Jul 2019 06:18:03 +0000 (+0000) Subject: Silence gcc warning by adding parentheses to condition [NFC] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55e1bd58805fa90af0f8daa4c993ba1fd42d537f;p=llvm Silence gcc warning by adding parentheses to condition [NFC] Without this gcc 7.4.0 complains with ../include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:457:54: error: suggest parentheses around '&&' within '||' [-Werror=parentheses] isArtifactCast(TmpDef->getOpcode()) && ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ "Expecting copy or artifact cast here"); ~ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365597 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h b/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h index 2183ba0b02b..a22778b8848 100644 --- a/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h +++ b/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h @@ -453,9 +453,9 @@ private: MachineInstr *TmpDef = MRI.getVRegDef(PrevRegSrc); if (MRI.hasOneUse(PrevRegSrc)) { if (TmpDef != &DefMI) { - assert(TmpDef->getOpcode() == TargetOpcode::COPY || - isArtifactCast(TmpDef->getOpcode()) && - "Expecting copy or artifact cast here"); + assert((TmpDef->getOpcode() == TargetOpcode::COPY || + isArtifactCast(TmpDef->getOpcode())) && + "Expecting copy or artifact cast here"); DeadInsts.push_back(TmpDef); }