User Details
- User Since
- May 10 2023, 12:34 PM (20 w, 4 d)
Aug 27 2023
Aug 26 2023
Aug 24 2023
Jul 31 2023
Jul 27 2023
Jul 24 2023
Addresses latest review comments.
Jul 21 2023
Jul 7 2023
Addressed outstanding review comments.
This iteration switches away from using AlignConsecutiveStyle and instead uses a new ShortCaseStatementsAlignmentStyle.
Jul 5 2023
I re-wrote the alignment to stop using AlignTokens so that I can now handle all the edge cases that came up. Specifically:
- Allowing empty case labels (implicit fall through) to not break the alignment, but only if they are sandwiched by short case statements.
- Don't align the colon of a non-short case label that follows short case labels when using 'AlignCaseColons=true'.
- Empty case labels will also now push out the alignment of the statements when using AlignCaseColons=false.
Jun 12 2023
Well, I guess I didn't put quite enough thought into the AlignCaseColons option. While this solves the empty case label problem, it will also match in non-short case label scenarios such as the following, which doesn't seem desirable:
Ok, I added the ability to align the case label colons. In your original message you mentioned "I'd like to align the colon (and thus the statement behind that)" which implies actually adding the whitespace after the 'case' token itself. Not sure if that would still be your preference in an ideal world, or if I just misinterpreted your request. Aligning the colons themselves is very straightforward.
Jun 9 2023
Jun 7 2023
Jun 6 2023
Jun 3 2023
Fixup up review comments.
Jun 2 2023
May 31 2023
May 30 2023
May 22 2023
Thanks for the additional review comments. Hopefully everything if fixed.
May 17 2023
May 15 2023
Thanks @HazardyKnusperkeks! I don't have commit access, so will need someone to land this for me.
Thanks for the review and feedback. Sorry about the unfortunate timing between @sstwcw and my fix - we submitted our fixes less than 24 hours apart. I didn't think there would be another simultaneous fix for this 5 year old bug, so didn't even think to link to the review in the GitHub issue. I will definitely do this for any future contributions.
Addressed remaining review feedback.
May 12 2023
@HazardyKnusperkeks, thanks for the feedback. I added the TokenAnnotatorTests from @sstwcw's review. I also updated the design to use a single stack instead of the two parallel stacks.
Coincidentally I also sent out a review to fix this issue yesterday, but went with a different approach of trying to scope the ProbablyBracedList logic by just looking at the lbrace previous token.
Looks like @sstwcw also submitted a fix for the same issue, with a bit of a different approach: https://reviews.llvm.org/D150452