-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
proper indention for goto destination point #24492
Comments
I'd also like better control over this. In my personal code I put labels on their own line a HALF indent back to make them stick out a bit:
...but I don't think there's a way to make clang-format do that, either. |
Yeah, our handling of goto labels isn't ideal. That being said, I am not aware of major codebases using them enough to be worth spending time on it. If you (or someone else) wants to provide a patch, I am very happy to review it, but otherwise, I don't see any of the existing contributors working on this any time soon. |
FWIW this is typical in the GNU style as well. |
I confirm this is still an issue in clang-format v13 |
Can I pick this issue? Since I am beginning my learning all over again and recently used clang-format in another open-source project. @MacDue |
@varshneydevansh Sure! |
Hi @Endilll do I have to start working from the directory https://github.com/llvm/llvm-project/tree/main/clang clang/lib/Format |
Yes, that's where Clang subproject lives. |
Extended Description
When using clang format based on google style.
It reformat the following code to
Could someone add a clang format style options so the "end_double_loop" will be aligned to the first for loop instead of int main? Meaning the desired format is
Thanks,
Jason
The text was updated successfully, but these errors were encountered: