[Mlir-commits] [mlir] [mlir][tblgen] Add checked formatting with owned substitution errors (PR #238148)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Nov 2 15:49:19 PST 2026
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 origin/main HEAD --extensions h,cpp -- mlir/include/mlir/TableGen/Format.h mlir/lib/TableGen/Format.cpp mlir/unittests/TableGen/FormatTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/include/mlir/TableGen/Format.h b/mlir/include/mlir/TableGen/Format.h
index eb259d802..9cd204b22 100644
--- a/mlir/include/mlir/TableGen/Format.h
+++ b/mlir/include/mlir/TableGen/Format.h
@@ -354,11 +354,11 @@ inline FmtStrVecObject tgfmtv(StringRef fmt, const FmtContext *ctx,
/// text is emitted literally, without recursive expansion. Failures inside
/// positional formatting providers are outside this validation.
///
-/// On failure, FmtError owns the template, all failed occurrences and their byte
-/// offsets, a snapshot of named bindings, and the positional argument count. No
-/// partial output is returned on validation failure. Successful results own
-/// their text; neither result nor error borrows the input template, context, or
-/// arguments.
+/// On failure, FmtError owns the template, all failed occurrences and their
+/// byte offsets, a snapshot of named bindings, and the positional argument
+/// count. No partial output is returned on validation failure. Successful
+/// results own their text; neither result nor error borrows the input template,
+/// context, or arguments.
template <typename... Ts>
llvm::Expected<std::string> tgfmtChecked(StringRef fmt, const FmtContext &ctx,
Ts &&...vals) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/238148
More information about the Mlir-commits
mailing list