[PATCH] D32337: [AsmWriter] Eliminate warning. NFC
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 22:14:51 PDT 2017
skatkov created this revision.
This patch eliminates the following warning
lib/IR/AsmWriter.cpp:1128:57: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
(StrVal[1] >= '0' && StrVal[1] <= '9')) &&
https://reviews.llvm.org/D32337
Files:
lib/IR/AsmWriter.cpp
Index: lib/IR/AsmWriter.cpp
===================================================================
--- lib/IR/AsmWriter.cpp
+++ 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.96095.patch
Type: text/x-patch
Size: 936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170421/e2605766/attachment.bin>
More information about the llvm-commits
mailing list