[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
Fri Nov 18 20:35:11 PST 2022
goldstein.w.n marked 2 inline comments as done.
goldstein.w.n added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:838
+ // If this changes PPLevel needs to be used for get correct indentation.
+ assert(!Line.InMacroBody && !InPPDirective);
return Line.Level * Style.IndentWidth + Length <= ColumnLimit;
----------------
owenpan wrote:
> ```
> error: use of undeclared identifier 'InPPDirective'
> assert(!Line.InMacroBody && !InPPDirective);
> ^
> ```
> Also, can you break it into two assertions as suggested so that we know which one failed even without a debugger?
Fixed. Sorry. Had only been rebuilting formattests. Figured everything else must have a dep.
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