[Mlir-commits] [mlir] [mlir][EmitC] Emit parentheses when expression ops are used as operands (PR #93691)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jun 3 04:58:46 PDT 2024
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 9a282724a29899e84adc91bdeaf639010408a80d 7b34b21a7f7ad81a194f76474aff0b9c398e7bde -- mlir/lib/Target/Cpp/TranslateToCpp.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Target/Cpp/TranslateToCpp.cpp b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
index bbc8aa7c9f..0f5bfeb3fc 100644
--- a/mlir/lib/Target/Cpp/TranslateToCpp.cpp
+++ b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
@@ -305,7 +305,7 @@ static bool shouldBeInlined(ExpressionOp expressionOp) {
// expression folding was taken care of by transformations.
if (user->getParentOfType<ExpressionOp>())
return false;
-
+
// Do not inline expressions used by ops with the CExpression trait.
return !user->hasTrait<OpTrait::emitc::CExpression>();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/93691
More information about the Mlir-commits
mailing list