[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 17 21:20:48 PST 2022
owenpan 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;
----------------
Shouldn't it be `assert(!Line.InMacroBody && !InPPDirective)` instead? You can also assert `Line.PPLevel == 0`.
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