Apply clang-tidy fixes for llvm-else-after-return in OpPythonBindingGen.cpp (NFC)

This commit is contained in:
Mehdi Amini 2022-05-24 01:28:57 +00:00
parent 0f68c959d2
commit eacfd04744
1 changed files with 1 additions and 1 deletions

View File

@ -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;