Skip to content

Commit 2cd013a

Browse files
committed
Apply clang-tidy fixes for llvm-else-after-return in IRDLVerifiers.cpp (NFC)
1 parent 04e2a5d commit 2cd013a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

mlir/lib/Dialect/IRDL/IRDLVerifiers.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,11 @@ ConstraintVerifier::verify(function_ref<InFlightDiagnostic()> emitError,
4141
if (assigned[variable].has_value()) {
4242
if (attr == assigned[variable].value()) {
4343
return success();
44-
} else {
45-
if (emitError)
46-
return emitError() << "expected '" << assigned[variable].value()
47-
<< "' but got '" << attr << "'";
48-
return failure();
4944
}
45+
if (emitError)
46+
return emitError() << "expected '" << assigned[variable].value()
47+
<< "' but got '" << attr << "'";
48+
return failure();
5049
}
5150

5251
// Otherwise, check the constraint and assign the attribute to the variable.

0 commit comments

Comments
 (0)