[Mlir-commits] [mlir] eacfd04 - Apply clang-tidy fixes for llvm-else-after-return in OpPythonBindingGen.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Mon May 30 05:26:19 PDT 2022
Author: Mehdi Amini
Date: 2022-05-30T12:25:58Z
New Revision: eacfd0474427a14a1f104d8de7c5cb9711964962
URL: https://github.com/llvm/llvm-project/commit/eacfd0474427a14a1f104d8de7c5cb9711964962
DIFF: https://github.com/llvm/llvm-project/commit/eacfd0474427a14a1f104d8de7c5cb9711964962.diff
LOG: Apply clang-tidy fixes for llvm-else-after-return in OpPythonBindingGen.cpp (NFC)
Added:
Modified:
mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
index 83d2acce3ba2c..44c60c1dc6192 100644
--- a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
@@ -894,7 +894,7 @@ static void emitDefaultOpBuilder(const Operator &op, raw_ostream &os) {
Argument a = op.getArg(builderArgIndex - numResultArgs);
if (auto *nattr = a.dyn_cast<NamedAttribute *>())
return (nattr->attr.isOptional() || nattr->attr.hasDefaultValue());
- else if (auto *ntype = a.dyn_cast<NamedTypeConstraint *>())
+ if (auto *ntype = a.dyn_cast<NamedTypeConstraint *>())
return ntype->isOptional();
else
return false;
More information about the Mlir-commits
mailing list