Skip to content
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

Feature request: Two different indentation width options, one for code, one for pre-processor directives #42264

Open
hartwork opened this issue Aug 7, 2019 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang-format enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@hartwork
Copy link

hartwork commented Aug 7, 2019

Bugzilla Link 42919
Version unspecified
OS All
CC @claudiusaiz

Extended Description

It seems like option "IndentWidth" effects both C/C++ code indentation width as well as pre-processor indentation width. What I have seen a few times is that pre-processor indentation uses a single space per level while the C/C++ code in the same file uses 2 or 4 spaces. "IndentWidth" seems to affect both widths which also means that pre-processor code will look very noise when "IndentWidth" is more than 2.

So it would be great to have two options, "IndentWidth" and a new one "IndentWidthPP"(?), thinking of existing "IndentPPDirectives".

Would that be possible?

Thanks in advance!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@MaskRay
Copy link
Member

MaskRay commented Mar 30, 2022

The feature will be useful for compiler-rt and glibc (https://sourceware.org/pipermail/libc-alpha/2022-March/137362.html).

@Endilll Endilll added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed new-feature labels Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang-format enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

3 participants