[Mlir-commits] [mlir] 2cd013a - Apply clang-tidy fixes for llvm-else-after-return in IRDLVerifiers.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Wed Jan 17 08:52:30 PST 2024
Author: Mehdi Amini
Date: 2024-01-17T08:51:41-08:00
New Revision: 2cd013a7869a341a6536324c34f0c4e68bf01a38
URL: https://github.com/llvm/llvm-project/commit/2cd013a7869a341a6536324c34f0c4e68bf01a38
DIFF: https://github.com/llvm/llvm-project/commit/2cd013a7869a341a6536324c34f0c4e68bf01a38.diff
LOG: Apply clang-tidy fixes for llvm-else-after-return in IRDLVerifiers.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/IRDL/IRDLVerifiers.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/IRDL/IRDLVerifiers.cpp b/mlir/lib/Dialect/IRDL/IRDLVerifiers.cpp
index 90b068ba35831b..fab05d1ffb92fa 100644
--- a/mlir/lib/Dialect/IRDL/IRDLVerifiers.cpp
+++ b/mlir/lib/Dialect/IRDL/IRDLVerifiers.cpp
@@ -41,12 +41,11 @@ ConstraintVerifier::verify(function_ref<InFlightDiagnostic()> emitError,
if (assigned[variable].has_value()) {
if (attr == assigned[variable].value()) {
return success();
- } else {
- if (emitError)
- return emitError() << "expected '" << assigned[variable].value()
- << "' but got '" << attr << "'";
- return failure();
}
+ if (emitError)
+ return emitError() << "expected '" << assigned[variable].value()
+ << "' but got '" << attr << "'";
+ return failure();
}
// Otherwise, check the constraint and assign the attribute to the variable.
More information about the Mlir-commits
mailing list