[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-16 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Rebased and changed a unit test to use `verifyNoChange` before landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151954/new/ https://reviews.llvm.org/D151954 ___

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-16 Thread Owen Pan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG441108ccba94: Reland [clang-format] Fix overlapping whitespace replacements before PPDirective (authored by owenpan). Changed prior to commit:

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-14 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 531538. owenpan edited the summary of this revision. owenpan added a reviewer: paulkirth. owenpan removed a subscriber: paulkirth. owenpan added a comment. Add a member `Newlines` to `struct FormatToken` and compute it only once in

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-08 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a subscriber: leonardchan. owenpan added a comment. @leonardchan I'm not sure this patch should be reverted just yet. I can't reproduce the regression, and this patch does fix a previous regression. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-07 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like the revert broke tests: http://45.33.8.238/linux/109159/step_7.txt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151954/new/ https://reviews.llvm.org/D151954 ___

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-07 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D151954#4403921 , @paulkirth wrote: > This patch seems to introduce some significant regressions to formatting. > I've filed https://github.com/llvm/llvm-project/issues/63170 with some > candidate code. I'll try to reduce

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-07 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. I'd also suggest reverting this until it can be fixed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151954/new/ https://reviews.llvm.org/D151954 ___ cfe-commits mailing list

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-07 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. This patch seems to introduce some significant regressions to formatting. I've filed https://github.com/llvm/llvm-project/issues/63170 with some candidate code. I'll try to reduce the case as I can, but I'm guessing something is incorrect w/ how the indentation level

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-03 Thread Owen Pan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4b9764959dc4: [clang-format] Fix overlapping replacements before PPDirectives (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-02 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 527765. owenpan added a comment. Removed the `RootToken` parameter. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151954/new/ https://reviews.llvm.org/D151954 Files: clang/lib/Format/UnwrappedLineFormatter.cpp

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-01 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1425 + const SmallVectorImpl , + const FormatToken , + const FormatStyle ) { I will

[PATCH] D151954: [clang-format] Fix overlapping whitespace replacements before PPDirective

2023-06-01 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, MyDeveloperDay. owenpan requested review of this revision. If the first token of an annotated line is finalized, reuse its