[PATCH] D124036: [clang-format] Don't skip PP lines if original line was a PP line when trying to merge lines
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 20 01:59:34 PDT 2022
owenpan added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:310-313
for (; J != AnnotatedLines.begin(); --J)
- if (!(*J)->InPPDirective && (*J)->Level < TheLine->Level)
+ if ((TheLine->InPPDirective || !(*J)->InPPDirective) &&
+ (*J)->Level < TheLine->Level)
break;
----------------
Or simply return before the `for` loop if `TheLine->InPPDirective` is true?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124036/new/
https://reviews.llvm.org/D124036
More information about the cfe-commits
mailing list