goldstein.w.n marked 2 inline comments as done. goldstein.w.n added inline comments.
================ Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:69 (Style.PPIndentWidth >= 0) ? Style.PPIndentWidth : Style.IndentWidth; - Indent = Line.Level * IndentWidth + AdditionalIndent; + if (Line.InMacroBody && Line.PPLevel != 0 && + static_cast<unsigned>(Line.PPLevel) < Line.Level) { ---------------- sstwcw wrote: > What is this test for? > > ``` > clang-format -style='{IndentPPDirective: BeforeHash, PPIndentWidth: 2, > IndentWidth: 4, ColumnLimit: 40}' > > actual: > #define X \ > { \ > x; \ > x; \ > } > > expected: > #define X \ > { \ > x; \ > x; \ > } > ``` You're right, unneeded. Fixed and added test for it. ================ Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:73 + Indent += (Line.Level - Line.PPLevel - 1) * Style.IndentWidth; + if (PPIndentWidth < Style.IndentWidth) + Indent += Style.IndentWidth - PPIndentWidth; ---------------- sstwcw wrote: > What is this for? > > ``` > clang-format -style='{IndentPPDirective: BeforeHash, PPIndentWidth: 4, > IndentWidth: 1, ColumnLimit: 40}' > > actual: > #if X > #define X \ > { \ > x; \ > x; \ > } > #endif > > expected: > #if X > #define X \ > { \ > x; \ > x; \ > } > #endif > ``` You're right, unneeded. Fixed and added test for it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137181/new/ https://reviews.llvm.org/D137181 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits