[clang-tools-extra] [clang-doc] Wire Markdown parser into MDGenerator for fenced code blocks (PR #201746)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 5 12:51:37 PDT 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 cpp,h -- clang-tools-extra/clang-doc/support/Markdown.cpp clang-tools-extra/clang-doc/support/Markdown.h clang-tools-extra/test/clang-doc/markdown-fenced-code.cpp clang-tools-extra/unittests/clang-doc/MarkdownParserTest.cpp clang-tools-extra/clang-doc/MDGenerator.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/clang-tools-extra/clang-doc/support/Markdown.cpp b/clang-tools-extra/clang-doc/support/Markdown.cpp
index 3c425d895..957f16179 100644
--- a/clang-tools-extra/clang-doc/support/Markdown.cpp
+++ b/clang-tools-extra/clang-doc/support/Markdown.cpp
@@ -19,9 +19,7 @@ namespace clang {
 namespace doc {
 namespace markdown {
 
-static MDNode makeText(llvm::StringRef S) {
-  return {NodeKind::NK_Text, S, {}};
-}
+static MDNode makeText(llvm::StringRef S) { return {NodeKind::NK_Text, S, {}}; }
 
 // A line is a table separator if it only contains |, -, :, and spaces,
 // and has at least one -.

``````````

</details>


https://github.com/llvm/llvm-project/pull/201746


More information about the cfe-commits mailing list