[PATCH] D103286: [clang-format] Add PPIndentWidth option
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 29 08:59:42 PDT 2021
HazardyKnusperkeks requested changes to this revision.
HazardyKnusperkeks added a comment.
This revision now requires changes to proceed.
Love it!
But this will result in unexpected (one might say breaking) behaviour, if someone set `IndentWidth` to a different value than his base style and update clang-format without adding a setting for `PPIndentWidth`. So in my opinion it should have a different default value, which always picks up `IndentWidth` until `PPIndentWidth` is explicitly set. Either some form of optional, or for me `-1` is also fine, but I know others are more reluctant to use `-1`.
================
Comment at: clang/unittests/Format/FormatTest.cpp:3438
+ style.PPIndentWidth = 1;
+ style.IndentPPDirectives = FormatStyle::PPDIS_AfterHash;
+
----------------
How about the other `IndentPPDirectives` values?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103286/new/
https://reviews.llvm.org/D103286
More information about the cfe-commits
mailing list