[clang] [clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (PR #96804)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 14 01:36:54 PDT 2024


================
@@ -4778,8 +4778,8 @@ void UnwrappedLineParser::distributeComments(
     if (HasTrailAlignedWithNextToken && i == StartOfTrailAlignedWithNextToken) {
       FormatTok->ContinuesLineCommentSection = false;
     } else {
-      FormatTok->ContinuesLineCommentSection =
-          continuesLineCommentSection(*FormatTok, *Line, CommentPragmasRegex);
+      FormatTok->ContinuesLineCommentSection = continuesLineCommentSection(
+          *FormatTok, *Line, Style.ReflowComments, CommentPragmasRegex);
----------------
owenca wrote:

```suggestion
          *FormatTok, *Line, Style, CommentPragmasRegex);
```

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


More information about the cfe-commits mailing list