[llvm] [llvm-symbolizer] Eagerly flush markup-less line fragments (PR #185568)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 11:57:29 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 -- llvm/include/llvm/DebugInfo/Symbolize/MarkupFilter.h llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp llvm/unittests/DebugInfo/Symbolizer/MarkupTest.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/llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp b/llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp
index 5ef755ec0..c1d37f755 100644
--- a/llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp
@@ -62,7 +62,7 @@ void MarkupFilter::filter(StringRef Input) {
     // input.
     StringRef S(Line);
     if (S.find("{{{") == StringRef::npos && !S.ends_with("{") &&
-      !S.ends_with("{{")) {
+        !S.ends_with("{{")) {
       OS << Line;
       Line.clear();
       ShouldFlush = true;
diff --git a/llvm/unittests/DebugInfo/Symbolizer/MarkupTest.cpp b/llvm/unittests/DebugInfo/Symbolizer/MarkupTest.cpp
index a10a5a992..556d4fc09 100644
--- a/llvm/unittests/DebugInfo/Symbolizer/MarkupTest.cpp
+++ b/llvm/unittests/DebugInfo/Symbolizer/MarkupTest.cpp
@@ -221,7 +221,6 @@ TEST(SymbolizerMarkup, MultilineElements) {
   EXPECT_THAT(Parser.nextNode(), std::nullopt);
 }
 
-
 // Non-markup fragments are eagerly flushed before any newline arrives.
 TEST(MarkupFilter, EagerFragmentFlush) {
   std::string Out;

``````````

</details>


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


More information about the llvm-commits mailing list