[PATCH] D103286: [clang-format] Add PPIndentWidth option

Gerhard Gappmeier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 31 02:24:18 PDT 2021


gergap marked 3 inline comments as done.
gergap added a comment.

I fixed the review findings and changed the behavior to be better backwards compatible by using PPIndentWidth=-1 by default.
This value defaults to IndentWidth now.



================
Comment at: clang/unittests/Format/FormatTest.cpp:3447
+               style);
+}
+
----------------
MyDeveloperDay wrote:
> can you add a test
> 
> ```
> #ifdef X
>    void foo() {
>        ...
>    }
> #endif
> ```
> 
> its unclear if PPIndentWidth affects code in #ifdef or just # preprocessor instructions
It does not affect the code. It works in the same way as IndentWidth.
I updated the test cases now to verify this.


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