[PATCH] D93986: [clang-format] Add the possibility to align assignments spanning empty lines or comments
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 3 12:26:47 PST 2021
MyDeveloperDay added inline comments.
================
Comment at: clang/include/clang/Format/Format.h:130
+ /// \endcode
+ ACA_AcrossComments
+ };
----------------
Is there a case for aligning over empty lines and comments?
```
int a = 5;
/* comment */
int oneTwoThree = 123;
```
================
Comment at: clang/lib/Format/Format.cpp:140
+ IO.enumCase(Value, "AcrossEmptyLines", FormatStyle::ACA_AcrossEmptyLines);
+ IO.enumCase(Value, "AcrossComments", FormatStyle::ACA_AcrossComments);
+ }
----------------
move true and false to the bottom and separate with
```// For backward compatibility.```
comment (see below)
================
Comment at: clang/lib/Format/WhitespaceManager.cpp:367
+ unsigned StartAt, bool AcrossEmpty = false,
+ bool AcrossComments = false) {
unsigned MinColumn = 0;
----------------
could this be an enum?
```
enum {
None
AcrossEmptyLines,
AcrossComments,
AcrossEmptyLinesAndComments,
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93986/new/
https://reviews.llvm.org/D93986
More information about the cfe-commits
mailing list