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

Mehdi Amini llvmlistbot at llvm.org
Tue Jan 3 01:46:32 PST 2023


Author: Mehdi Amini
Date: 2023-01-03T09:45:40Z
New Revision: b9dac89ba450c579895c6219362c5826d4a8eeda

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

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

Added: 
    

Modified: 
    mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp b/mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp
index 9579052c9940a..d819ee2647a61 100644
--- a/mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp
+++ b/mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp
@@ -68,15 +68,13 @@ void WrittenToAnalysis::visitOperation(Operation *op,
     new_writes.insert(op->getAttrOfType<StringAttr>("tag_name"));
     propagateIfChanged(operands[0], operands[0]->addWrites(new_writes));
     return;
-  } else {
-    // By default, every result of an op depends on every operand.
+  } // By default, every result of an op depends on every operand.
     for (const WrittenTo *r : results) {
       for (WrittenTo *operand : operands) {
         meet(operand, *r);
       }
       addDependency(const_cast<WrittenTo *>(r), op);
     }
-  }
 }
 
 void WrittenToAnalysis::visitBranchOperand(OpOperand &operand) {


        


More information about the Mlir-commits mailing list