[Mlir-commits] [mlir] be31063 - Apply clang-tidy fixes for llvm-else-after-return in OpenMPDialect.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu May 5 22:40:33 PDT 2022


Author: Mehdi Amini
Date: 2022-05-06T05:40:02Z
New Revision: be310632d037d58b2bfe7a6fee5ddd6e291cab51

URL: https://github.com/llvm/llvm-project/commit/be310632d037d58b2bfe7a6fee5ddd6e291cab51
DIFF: https://github.com/llvm/llvm-project/commit/be310632d037d58b2bfe7a6fee5ddd6e291cab51.diff

LOG: Apply clang-tidy fixes for llvm-else-after-return 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 5540eec8f3005..3bc0ecf0fd0fd 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -967,7 +967,8 @@ LogicalResult CancelOp::verify() {
       !isa<ParallelOp>(parentOp)) {
     return emitOpError() << "cancel parallel must appear "
                          << "inside a parallel region";
-  } else if (cct == ClauseCancellationConstructType::Loop) {
+  }
+  if (cct == ClauseCancellationConstructType::Loop) {
     if (!isa<WsLoopOp>(parentOp)) {
       return emitOpError() << "cancel loop must appear "
                            << "inside a worksharing-loop region";
@@ -1011,8 +1012,9 @@ LogicalResult CancellationPointOp::verify() {
       !(isa<ParallelOp>(parentOp))) {
     return emitOpError() << "cancellation point parallel must appear "
                          << "inside a parallel region";
-  } else if ((cct == ClauseCancellationConstructType::Loop) &&
-             !isa<WsLoopOp>(parentOp)) {
+  }
+  if ((cct == ClauseCancellationConstructType::Loop) &&
+      !isa<WsLoopOp>(parentOp)) {
     return emitOpError() << "cancellation point loop must appear "
                          << "inside a worksharing-loop region";
   } else if ((cct == ClauseCancellationConstructType::Sections) &&


        


More information about the Mlir-commits mailing list