[clang] 9e3e85a - Silence -Wlogical-op-parentheses and fix a logic bug while doing so
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 14 07:13:55 PDT 2022
Author: Aaron Ballman
Date: 2022-03-14T10:13:39-04:00
New Revision: 9e3e85ac6efeb948647810dae93f3ba0cc8a4314
URL: https://github.com/llvm/llvm-project/commit/9e3e85ac6efeb948647810dae93f3ba0cc8a4314
DIFF: https://github.com/llvm/llvm-project/commit/9e3e85ac6efeb948647810dae93f3ba0cc8a4314.diff
LOG: Silence -Wlogical-op-parentheses and fix a logic bug while doing so
Added:
Modified:
clang/lib/Lex/LiteralSupport.cpp
Removed:
################################################################################
diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp
index 6bab51250adb1..6e6fd361ebf94 100644
--- a/clang/lib/Lex/LiteralSupport.cpp
+++ b/clang/lib/Lex/LiteralSupport.cpp
@@ -907,8 +907,8 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling,
// explicitly do not support the suffix in C++ as an extension because a
// library-based UDL that resolves to a library type may be more
// appropriate there.
- if (!LangOpts.CPlusPlus && (s[0] == 'w' && s[1] == 'b') ||
- (s[0] == 'W' && s[1] == 'B')) {
+ if (!LangOpts.CPlusPlus && ((s[0] == 'w' && s[1] == 'b') ||
+ (s[0] == 'W' && s[1] == 'B'))) {
isBitInt = true;
HasSize = true;
++s; // Skip both characters (2nd char skipped on continue).
More information about the cfe-commits
mailing list