[clang] [llvm] clang-format reflow comments disable star: Fixes #58710 (PR #167146)

via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 8 13:08:00 PST 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 origin/main HEAD --extensions h,cpp -- clang/test/Format/ReflowCommentsNoStar.cpp clang/test/Format/ReflowCommentsNoStarExpected.cpp clang/test/Format/ReflowCommentsNoStarInput.cpp clang/include/clang/Format/Format.h clang/lib/Format/BreakableToken.cpp clang/lib/Format/Format.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/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h
index 1c3050ec9..4de1a9f40 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -4250,15 +4250,19 @@ struct FormatStyle {
   /// \version 3.8
   ReflowCommentsStyle ReflowComments;
 
-  /// If reflow comments is enabled, dont include * in the formatted block comment.
-    /// \code
-    ///    // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of
-    ///    // information
-    ///    /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of
-    ///     information */
-    ///    /* third veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of
-    ///     information and a misaligned second line */
-    /// \endcode
+  /// If reflow comments is enabled, dont include * in the formatted block
+  /// comment.
+  /// \code
+  ///    // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty
+  ///    of
+  ///    // information
+  ///    /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with
+  ///    plenty of
+  ///     information */
+  ///    /* third veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with
+  ///    plenty of
+  ///     information and a misaligned second line */
+  /// \endcode
 
   /// \version 22
   bool ReflowCommentsNoStar;

``````````

</details>


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


More information about the llvm-commits mailing list