-
Notifications
You must be signed in to change notification settings - Fork 3
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
Unusual indentation #20
Comments
See #19. |
A work in progress version of the code for this is available here: https://github.com/saloniig/llvm-project/tree/wip_haiku_api We have also found that clang-format has a somewhat similar feature: MacroBlockBegin and MacroBlockEnd are used to identify some specific macros and change the indentation of following lines as a result. Unfortunately, it is not usable directly in our case, because the methods we want to detect are part of a more complex statement. But I think it shows that such things are possible in clang-format, even if the parser does not have a deep understanding of the sourcecode. I would suggest to reopen this issue because this seems quite important to using haiku-format on Haiku sourcecode. If we don't do this, a lot of code (everything related to building user interfaces) would need to be in "clang-format off" blocks, and this would reduce the usefulness of the tool a lot. |
Also reopened #19. |
Here is the link of the code for this issue : |
Can you create a PR at https://github.com/owenca/llvm-project/tree/haiku-format? Please also include the test case(s) you used. Thanks! |
This breaks a lot of unit tests and causes segmentation faults:
|
According to haiku guidelines every call to .AddGroup results in an extra indentation level for all things that go inside the group, until the next call to .End() but haiku-format removes indentation which is incorrect as shown below in code:
code
The text was updated successfully, but these errors were encountered: