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

Mehdi Amini llvmlistbot at llvm.org
Mon Feb 19 16:41:52 PST 2024


Author: Mehdi Amini
Date: 2024-02-19T16:41:28-08:00
New Revision: 6b72c37958c3d8aa0cfa48c4ad6509dd6ea37749

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

LOG: Apply clang-tidy fixes for llvm-else-after-return in TestVisitors.cpp (NFC)

Added: 
    

Modified: 
    mlir/test/lib/IR/TestVisitors.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/test/lib/IR/TestVisitors.cpp b/mlir/test/lib/IR/TestVisitors.cpp
index f4cff39cf2e523..7df0ddb7ca27e9 100644
--- a/mlir/test/lib/IR/TestVisitors.cpp
+++ b/mlir/test/lib/IR/TestVisitors.cpp
@@ -136,12 +136,12 @@ static void testSkipErasureCallbacks(Operation *op) {
       llvm::outs() << "\n";
       block->erase();
       return WalkResult::skip();
-    } else {
-      llvm::outs() << "Cannot erase ";
-      printBlock(block);
-      llvm::outs() << ", still has uses\n";
-      return WalkResult::advance();
     }
+    llvm::outs() << "Cannot erase ";
+    printBlock(block);
+    llvm::outs() << ", still has uses\n";
+    return WalkResult::advance();
+   
   };
 
   llvm::outs() << "Op pre-order erasures (skip)"


        


More information about the Mlir-commits mailing list