[Mlir-commits] [mlir] [emitC]Option to mlir-translate class instead of function (PR #141158)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu May 29 11:20:05 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 h,cpp -- mlir/include/mlir/Target/Cpp/CppEmitter.h mlir/lib/Target/Cpp/TranslateRegistration.cpp 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 aa85a03b8..fc550d241 100644
--- a/mlir/lib/Target/Cpp/TranslateToCpp.cpp
+++ b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
@@ -70,8 +70,8 @@ inline LogicalResult interleaveCommaWithError(const Container &c,
template <typename Container, typename UnaryFunctor>
inline LogicalResult interleaveWithNewLineWithError(const Container &c,
- raw_ostream &os,
- UnaryFunctor eachFn) {
+ raw_ostream &os,
+ UnaryFunctor eachFn) {
return interleaveWithError(c.begin(), c.end(), eachFn,
[&]() { os << ";\n"; });
}
@@ -1234,8 +1234,9 @@ static LogicalResult printOperation(CppEmitter &emitter,
// TODO: Determine the best long-term strategy for external functions.
// Currently, we're skipping over this functionOp.
// We have considered using emitWarning() which would return
- // InFlightDiagnostic which seems can be automatically converted to LogicalResult since
- // this is done in emitAttributes where emitError is converted to LogicalResult. However, it requires that we pass in a
+ // InFlightDiagnostic which seems can be automatically converted to
+ // LogicalResult since this is done in emitAttributes where emitError is
+ // converted to LogicalResult. However, it requires that we pass in a
// location which at first glance we don't have in this scope. Open to
// further discussion on this.
os << "Warning: Cannot process external function '"
``````````
</details>
https://github.com/llvm/llvm-project/pull/141158
More information about the Mlir-commits
mailing list