https://github.com/llvm/llvm-project/issues/53008
template <class Id> using A = quantity /**/<kind<Id>, 1>;
the presence of the comment between identifier and template opener seems to be causing the qualifier alignment to fail
Paths
| Differential D116726
[clang-format] Fix a crash (assertion) in qualifier alignment when matching template closer is null ClosedPublic Authored by MyDeveloperDay on Jan 6 2022, 12:24 AM.
Details Summary https://github.com/llvm/llvm-project/issues/53008 template <class Id> using A = quantity /**/<kind<Id>, 1>; the presence of the comment between identifier and template opener seems to be causing the qualifier alignment to fail
Diff Detail Event TimelineMyDeveloperDay created this revision.
MyDeveloperDay marked 3 inline comments as done. Comment ActionsUse getNextNonComment() which has some const-ness knock ons (but probably not a bad thing) address the review concerns by adding more tests (which indeed highlighted new failure scenarios! Thanks @curdeius) This revision is now accepted and ready to land.Jan 6 2022, 5:44 AM Comment Actions Just a last thought, you can maybe minimize some of the test cases. using X = Y /**/ <>; reproduces the issue. Comment Actions Simplify down the test to make it easier to read, keep perhaps slightly duplicated tests to just ensure we have the coverage This revision was landed with ongoing or failed builds.Jan 6 2022, 11:46 AM Closed by commit rG031d3ece3f2e: [clang-format] Fix a crash (assertion) in qualifier alignment when matching… (authored by MyDeveloperDay). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 397853 clang/lib/Format/QualifierAlignmentFixer.h
clang/lib/Format/QualifierAlignmentFixer.cpp
clang/unittests/Format/QualifierFixerTest.cpp
|
Could you test with a line comment too?