[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 25 13:38:04 PDT 2022
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/Format.cpp:649
IO.mapOptional("AlignOperands", Style.AlignOperands);
- IO.mapOptional("AlignTrailingComments", Style.AlignTrailingComments);
IO.mapOptional("AllowAllArgumentsOnNextLine",
----------------
MyDeveloperDay wrote:
> you can't remove an option, otherwise you'll break everyones .clang-format
That's not correct. We have done it:
D108752 -> D108882 -> D127390
You can remove (and in this case should), but you still need to parse it and act accordingly. Which is done as far as I can see.
================
Comment at: clang/unittests/Format/FormatTest.cpp:20044
Style.Language = FormatStyle::LK_Cpp;
- CHECK_PARSE_BOOL(AlignTrailingComments);
CHECK_PARSE_BOOL(AllowAllArgumentsOnNextLine);
----------------
MyDeveloperDay wrote:
> don't remove
It's tested below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132131/new/
https://reviews.llvm.org/D132131
More information about the cfe-commits
mailing list