New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AlignConsecutiveDeclarations fails with attibutes #39764
Comments
clang-format doesn't see the
When we run this with the --debug option if we look at this line
it's represented as
but this line:
is more complex,
In the code, I suspect it needs to be able to handle other token types(l_parent,identifier,coloncolon,r_paren)
One way is to look for specific sequences
Which handles some cases but not your empty attribute example of After adding these 2
but the following with your example
Although they too can be handled by adding:
Before submitting a patch, I'd like to understand if the your empty example has a real world usecase? MyDeveloperDay |
The empty argument example was just a result of simplifying the real world use case. Our code-base never has empty attribute lists. |
Extended Description
clang-format produces:
Given configuration:
It fails to align both the parameters and variables declarations with attributes. Other lines work fine. But those with attributes are ignored.
The text was updated successfully, but these errors were encountered: