From eacfd0474427a14a1f104d8de7c5cb9711964962 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Tue, 24 May 2022 01:28:57 +0000 Subject: [PATCH] Apply clang-tidy fixes for llvm-else-after-return in OpPythonBindingGen.cpp (NFC) --- mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp index 83d2acce3ba2..44c60c1dc619 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()) return (nattr->attr.isOptional() || nattr->attr.hasDefaultValue()); - else if (auto *ntype = a.dyn_cast()) + if (auto *ntype = a.dyn_cast()) return ntype->isOptional(); else return false;