Apply clang-tidy fixes for llvm-prefer-isa-or-dyn-cast-in-conditionals in OpenMPDialect.cpp (NFC)

This commit is contained in:
Mehdi Amini 2022-05-05 23:02:38 +00:00
parent ec34de1bfe
commit 061f253e13
1 changed files with 1 additions and 1 deletions

View File

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