https://bugs.llvm.org/show_bug.cgi?id=48916
Left and Right Alignment inside a loop is misaligned.
Paths
| Differential D115050
[clang-format] PR48916 PointerAlignment not working when using C++20 init-statement in for loop ClosedPublic Authored by MyDeveloperDay on Dec 3 2021, 9:50 AM.
Details Summary https://bugs.llvm.org/show_bug.cgi?id=48916 Left and Right Alignment inside a loop is misaligned.
Diff Detail Event TimelineMyDeveloperDay created this revision.
Comment Actions This fix has to go super specific to range for loops or we start manipulating pointer alignment all over the place in places perhaps we don't want to MyDeveloperDay marked an inline comment as done. Comment ActionsFix the merge and add the tests back (which missed the patch) Comment Actions
Yes oops!
This revision now requires changes to proceed.Dec 8 2021, 1:39 AM
This revision is now accepted and ready to land.Dec 9 2021, 12:44 AM Closed by commit rG2a73a1ac57f0: [clang-format] PR48916 PointerAlignment not working when using C++20 init… (authored by MyDeveloperDay). · Explain WhyDec 9 2021, 2:37 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 391993 clang/lib/Format/FormatToken.h
clang/lib/Format/FormatToken.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp
|
Is this valid code? Or did we just wrongly assign PointerOrReference? I'd say after that there can not be a literal in valid code, thus we do not need to handle it.