- User Since
- Feb 24 2023, 12:59 AM (14 w, 2 d)
Mar 27 2023
Yes, of course. Thanks!
Okay thanks. If the + options works let's go with
Mar 15 2023
Mar 13 2023
What is the next step in the process? Anything I should do?
Mar 6 2023
Handle /*c*/ comments inside types.
Add >> test to right->left.
Missed right->left in the fix. Also looking a bit at comments, e.g.
Add extra tests based on https://github.com/llvm/llvm-project/issues/56111
Mar 4 2023
Mar 2 2023
Thanks for the comments and help on this review. There are a lot of special cases I had not considered before, and while it works on the clang/ and llvm/ subfolders as well as tests and the other repository I tested on, I suppose there could still be some hidden issues. Allowing any identifier without the requirement that it is a pointer type adds a lot of complexity.
Mar 1 2023
I used clang-format on all files in clang/ and llvm/, where I had added QualifierAlignment: Right to any .clang-format. I built withcmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" cmake --build build
Is that sufficient or did you imagine some other build?
Change order for typename and :: as
const typename ::Bar b; is valid code.
This code from llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp failed with Right but without a full list of specifiers. As static was not configured, the } was not discovered by IsRightQualifier. Changed some of the qualifier tests to check against the full list instead.
Distinguish configured qualifiers from other qualifiers.
Feb 28 2023
Discovered incorrect code generation for llvm/include/llvm/ADT/StringMap.h.
Ignore decltype, typeof, and _Atomic.
Set length of TT_TemplateCloser to 1.
Feb 27 2023
Update commit message
There are a lot of complicated cases when trying to extend this functionality. I addressed a few more and thought that it might be acceptable to avoid adjusting the qualifiers for variable declared as
Update right to left analyzer
Add support for requires clauses
Ignore usages of struct/class keyword
Fix simple types not moving all the way right.
Fixed comments and rebased. Tested right to left on the output of left to right and discovered two cases where the output code would not compile. Added new tests for those cases and I am working on improvements for right to left.
Rebase after change to pointer to member was merged.
Add case for typename used for nested dependent names.
Add assertions for template closers/openers.
Feb 25 2023
Thanks for the review so far!
Add comments for different cases.
Add more tests.
Fix whitespace issue.
Feb 24 2023
Highlight by me. That is not acceptable, running the output of clang-format through clang-format shall not result in any change. In that case it's better to not touch it in any way.
Add test with advanced type that would not work before.
Add pointer to member.
Fixed the const/volatile placement. Added a few tests.
I will add new tests / examples as well as look into the volatile/const ordering.
I tried to refactor QualifierAlignmentFixer to handle more types, notably removing the *,&,&& requirement as e.g. const Foo did not work. To avoid moving qualifiers too far, a test for "already east const" is introduced. However, to get the correct order for the east qualifiers Clang-Format must be used twice. I assume it's related to how fixes/replacements are handled. Would you like to have a look and perhaps suggest any improvements?