[Mlir-commits] [mlir] [mlir][tosa] Add error if and level checks for COND_IF & WHILE_LOOP (PR #136194)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Apr 27 14:13:15 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- mlir/lib/Dialect/Tosa/IR/TosaOps.cpp mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
index b6d2faeff..8a03c22be 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
@@ -458,10 +458,12 @@ private:
return;
Block *block = op->getBlock();
- if (!block) return;
+ if (!block)
+ return;
Region *region = block->getParent();
- if (!region) return;
+ if (!region)
+ return;
depth++;
getMaxNestedDepth(region->getParentOp(), depth);
``````````
</details>
https://github.com/llvm/llvm-project/pull/136194
More information about the Mlir-commits
mailing list