[llvm] r327827 - [ARM] Fix warnings about missing parentheses in ARMAsmParser

Mikhail Maltsev via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 19 02:48:58 PDT 2018


Author: miyuki
Date: Mon Mar 19 02:48:58 2018
New Revision: 327827

URL: http://llvm.org/viewvc/llvm-project?rev=327827&view=rev
Log:
[ARM] Fix warnings about missing parentheses in ARMAsmParser

Modified:
    llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=327827&r1=327826&r2=327827&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Mar 19 02:48:58 2018
@@ -1870,7 +1870,8 @@ public:
 
   bool isNEONReplicate(unsigned Width, unsigned NumElems, bool Inv,
                        bool AllowMinusOne) const {
-    assert(Width == 8 || Width == 16 || Width == 32 && "Invalid element width");
+    assert((Width == 8 || Width == 16 || Width == 32) &&
+           "Invalid element width");
     assert(NumElems * Width <= 64 && "Invalid result width");
 
     if (!isImm())
@@ -1907,8 +1908,10 @@ public:
   }
 
   static void checkNeonReplicateArgs(unsigned FromW, unsigned ToW) {
-    assert(FromW == 8 || FromW == 16 || FromW == 32 && "Invalid source width");
-    assert(ToW == 16 || ToW == 32 || ToW == 64 && "Invalid destination width");
+    assert((FromW == 8 || FromW == 16 || FromW == 32) &&
+           "Invalid source width");
+    assert((ToW == 16 || ToW == 32 || ToW == 64) &&
+           "Invalid destination width");
     assert(FromW < ToW && "ToW is not less than FromW");
   }
 




More information about the llvm-commits mailing list