[Mlir-commits] [mlir] 061f253 - Apply clang-tidy fixes for llvm-prefer-isa-or-dyn-cast-in-conditionals in OpenMPDialect.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Fri May 6 12:38:37 PDT 2022
Author: Mehdi Amini
Date: 2022-05-06T19:38:02Z
New Revision: 061f253e13b53904fb907a3da030a7e96b300761
URL: https://github.com/llvm/llvm-project/commit/061f253e13b53904fb907a3da030a7e96b300761
DIFF: https://github.com/llvm/llvm-project/commit/061f253e13b53904fb907a3da030a7e96b300761.diff
LOG: Apply clang-tidy fixes for llvm-prefer-isa-or-dyn-cast-in-conditionals in OpenMPDialect.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index 3bc0ecf0fd0fd..15e2836679e53 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -986,7 +986,7 @@ LogicalResult CancelOp::verify() {
return emitOpError() << "cancel sections must appear "
<< "inside a sections region";
}
- if (parentOp->getParentOp() && isa<SectionsOp>(parentOp->getParentOp()) &&
+ if (isa_and_nonnull<SectionsOp>(parentOp->getParentOp()) &&
cast<SectionsOp>(parentOp->getParentOp()).nowaitAttr()) {
return emitError() << "A sections construct that is canceled "
<< "must not have a nowait clause";
More information about the Mlir-commits
mailing list