[llvm] r300950 - [AsmWriter] Eliminate warning. NFC
Serguei Katkov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 23:14:39 PDT 2017
Author: skatkov
Date: Fri Apr 21 01:14:38 2017
New Revision: 300950
URL: http://llvm.org/viewvc/llvm-project?rev=300950&view=rev
Log:
[AsmWriter] Eliminate warning. NFC
This patch eliminates the following warning
lib/IR/AsmWriter.cpp:1128:57: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
(StrVal[1] >= '0' && StrVal[1] <= '9')) &&
Reviewers: timshen, rnk, davide
Reviewed By: davide
Subscribers: davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D32337
Modified:
llvm/trunk/lib/IR/AsmWriter.cpp
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=300950&r1=300949&r2=300950&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Fri Apr 21 01:14:38 2017
@@ -1123,10 +1123,10 @@ static void WriteConstantInternal(raw_os
// "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;
More information about the llvm-commits
mailing list