[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
Mon Nov 7 21:59:25 PST 2022


goldstein.w.n added a comment.

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

> @goldstein.w.n do you need to modify MacroCallReconstructor.cpp, Macros.h, and MacroCallReconstructorTest.cpp? Leaving them out wouldn't break any existing tests.
>
> Adding `PPBranchLevel` (or `PPLevel` in your case) to `UnwrappedLine` and `AnnotatedLine` worked for me. I suggest that you leave `PPLevel` alone in the annotator and don't change it at various places in the parser.

Hi, sorry to go mia all day. You're right I can drop all uses in the `MacroCallReconstructor`. Also realized some of my placements where incorrect (that's what was breaking the case statement example). Will drop `PPLevel` in `MacroCallReconstructor` and add tests for case statement shortly.


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