[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

Noah Goldstein via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 8 22:37:00 PST 2022


goldstein.w.n added a comment.

In D137181#3916505 <https://reviews.llvm.org/D137181#3916505>, @owenpan wrote:

> In D137181#3916488 <https://reviews.llvm.org/D137181#3916488>, @goldstein.w.n wrote:
>
>> In D137181#3916474 <https://reviews.llvm.org/D137181#3916474>, @owenpan wrote:
>>
>>> You can still simply the changes to UnwrappedLineParser.cpp a lot. In fact, instead of adjusting `PPLevel` at various places, you only need to set it once when `InMacroBody` is set.
>>
>> I don't think thats right, it needs to stay updated with the true macro depth (even though we only use `PPLevel` for formatting `InMacroBody` lines).
>
> My experiment from a few days ago was successful and also passes all the new tests you just added here. If your experience told you otherwise, then perhaps there are some missing test cases.

What did you do? Just set `PPLevel = PPBranchLevel`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137181/new/

https://reviews.llvm.org/D137181



More information about the cfe-commits mailing list