[PATCH] D127484: [clang-format] Use tabs on GNU style
Tsukasa OI via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 11 23:47:50 PDT 2022
a4lg marked an inline comment as done.
a4lg added a comment.
Interesting.
I measured some development branch (targeting `*.c`, `*.cc`, `*.cpp` and `*.h`):
| Program | prefix: 8 spaces | prefix: 1 tab | 8sp percentage |
| Coreutils | 23494 | 461 | 98.08% |
| Binutils | 128781 | 745992 | 14.72% |
| GCC | 155080 | 1156554 | 11.82% |
|
That's completely different from Coreutils (and that's why I submitted this patch because I'm a Binutils contributor).
Yes, there's definitely a reason to keep this style in clang-format. In this case, following .clang-format file will work:
BasedOnStyle: GNU
UseTab: ForContinuationAndIndentation
or following style setting on Visual Studio Code (not as JSON but a string):
{ BasedOnStyle: GNU, UseTab: ForContinuationAndIndentation }
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127484/new/
https://reviews.llvm.org/D127484
More information about the cfe-commits
mailing list