[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
Wed Oct 12 12:24:40 PDT 2022
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/WhitespaceManager.cpp:950-952
+ if (RestoredLineLength >= Style.ColumnLimit && Style.ColumnLimit != 0) {
+ break;
+ }
----------------
Elide the braces.
================
Comment at: clang/unittests/Format/FormatTestComments.cpp:3045
+ Style.AlignTrailingComments.Kind = FormatStyle::TCAS_Leave;
+ EXPECT_EQ("int a;// do not touch\n"
+ "int b; // any comments\n"
----------------
Can you do that in reverse order (more spaces at top) also?
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