[PATCH] D32337: [AsmWriter] Eliminate warning. NFC

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 23:27:36 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL300950: [AsmWriter] Eliminate warning. NFC (authored by skatkov).

Changed prior to commit:
  https://reviews.llvm.org/D32337?vs=96095&id=96099#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32337

Files:
  llvm/trunk/lib/IR/AsmWriter.cpp


Index: llvm/trunk/lib/IR/AsmWriter.cpp
===================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp
+++ llvm/trunk/lib/IR/AsmWriter.cpp
@@ -1123,10 +1123,10 @@
         // "Inf" or NaN, that atof will accept, but the lexer will not.  Check
         // that the string matches the "[-+]?[0-9]" regex.
         //
-        assert((StrVal[0] >= '0' && StrVal[0] <= '9') ||
-               ((StrVal[0] == '-' || StrVal[0] == '+') &&
-                (StrVal[1] >= '0' && StrVal[1] <= '9')) &&
-                   "[-+]?[0-9] regex does not match!");
+        assert(((StrVal[0] >= '0' && StrVal[0] <= '9') ||
+                ((StrVal[0] == '-' || StrVal[0] == '+') &&
+                 (StrVal[1] >= '0' && StrVal[1] <= '9'))) &&
+               "[-+]?[0-9] regex does not match!");
         // Reparse stringized version!
         if (APFloat(APFloat::IEEEdouble(), StrVal).convertToDouble() == Val) {
           Out << StrVal;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32337.96099.patch
Type: text/x-patch
Size: 969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170421/93e6d7b0/attachment.bin>


More information about the llvm-commits mailing list