[Mlir-commits] [mlir] bc13efb - Apply clang-tidy fixes for readability-simplify-boolean-expr in OpDefinitionsGen.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Mon Sep 12 18:09:41 PDT 2022
Author: Mehdi Amini
Date: 2022-09-13T01:09:14Z
New Revision: bc13efbe0ce1e525d53ed224194179ef1e6c356f
URL: https://github.com/llvm/llvm-project/commit/bc13efbe0ce1e525d53ed224194179ef1e6c356f
DIFF: https://github.com/llvm/llvm-project/commit/bc13efbe0ce1e525d53ed224194179ef1e6c356f.diff
LOG: Apply clang-tidy fixes for readability-simplify-boolean-expr in OpDefinitionsGen.cpp (NFC)
Added:
Modified:
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 70c22e17f27e..f9a5c8506d96 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -1571,7 +1571,7 @@ void OpEmitter::genSeparateArgParamBuilder() {
bool hasVariadicResult = numVariadicResults != 0;
// Avoid emitting "resultTypes.size() >= 0u" which is always true.
- if (!(hasVariadicResult && numNonVariadicResults == 0))
+ if (!hasVariadicResult || numNonVariadicResults != 0)
body << " "
<< "assert(resultTypes.size() "
<< (hasVariadicResult ? ">=" : "==") << " "
More information about the Mlir-commits
mailing list