[all-commits] [llvm/llvm-project] 0fba83: [clang-format] Introduce "ReflowComments: IndentOn...

Iuri Chaer via All-commits all-commits at lists.llvm.org
Fri Oct 11 19:14:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fba8381d2a71ff440fdf0ae30d59a0bf07fea75
      https://github.com/llvm/llvm-project/commit/0fba8381d2a71ff440fdf0ae30d59a0bf07fea75
  Author: Iuri Chaer <ichaer at splunk.com>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M clang/docs/ClangFormatStyleOptions.rst
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Format/Format.h
    M clang/lib/Format/BreakableToken.cpp
    M clang/lib/Format/BreakableToken.h
    M clang/lib/Format/ContinuationIndenter.cpp
    M clang/lib/Format/Format.cpp
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/unittests/Format/ConfigParseTest.cpp
    M clang/unittests/Format/FormatTest.cpp
    M clang/unittests/Format/FormatTestComments.cpp

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

* Convert `ReflowComments` from boolean into a new `enum` which can take
on the value `RCS_Never`, `RCS_IndentOnly`, or `RCS_Always`. The first
one is equivalent to the old `false`, the third one is `true`, and the
middle one means that multiline comments should only have their
indentation corrected, which is what Doxygen users will want.
* Preserve backward compatibility while parsing `ReflowComments`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list