[llvm] 01dcad0 - [GlobalISel] Silence gcc warning [NFC]
Karl-Johan Karlsson via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 04:36:08 PDT 2023
Author: Karl-Johan Karlsson
Date: 2023-08-14T13:35:27+02:00
New Revision: 01dcad04064182155d5568a464dfea95ba567764
URL: https://github.com/llvm/llvm-project/commit/01dcad04064182155d5568a464dfea95ba567764
DIFF: https://github.com/llvm/llvm-project/commit/01dcad04064182155d5568a464dfea95ba567764.diff
LOG: [GlobalISel] Silence gcc warning [NFC]
Without the fix gcc complains with:
../utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp:251:60: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
Added:
Modified:
llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp b/llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
index 90a868db9b84e1..f27bbbae1fedae 100644
--- a/llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
+++ b/llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
@@ -248,8 +248,8 @@ class CXXPredicateCode {
: Code(Code), ID(ID), BaseEnumName("GICombiner" + to_string(ID)) {
// Don't assert if ErrorsPrinted is set. This may mean CodeExpander failed,
// and it may add spaces in such cases.
- assert(ErrorsPrinted || StringRef(Code).trim() == Code &&
- "Code was expected to be trimmed!");
+ assert((ErrorsPrinted || StringRef(Code).trim() == Code) &&
+ "Code was expected to be trimmed!");
}
public:
More information about the llvm-commits
mailing list