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

[clang-format] BlockIndent defect #63383

Closed
williamhCode opened this issue Jun 19, 2023 · 3 comments
Closed

[clang-format] BlockIndent defect #63383

williamhCode opened this issue Jun 19, 2023 · 3 comments
Labels
clang-format duplicate Resolved as duplicate

Comments

@williamhCode
Copy link

williamhCode commented Jun 19, 2023

If AlignAfterOpenBracket is set to BlockIndent, and the line is exactly 1-2 characters over ColumnLimit, the closing parenthesis hangs in the next line, without the inner code block going to the next line.

For example, I have ColumnLimit set to 88, and this line is 90 characters long:

...
    bindGroupLayouts.push_back(handle.device.CreateBindGroupLayout(&bindGroupLayoutDesc));
...

This gets formatted to:

...
    bindGroupLayouts.push_back(handle.device.CreateBindGroupLayout(&bindGroupLayoutDesc)
    );
...

Instead, should be:

...
    bindGroupLayouts.push_back(
      handle.device.CreateBindGroupLayout(&bindGroupLayoutDesc)
    );
...

Info:
clang-format version: 16.0.6
macOS 12.6

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 19, 2023

@llvm/issue-subscribers-clang-format

@exo-core
Copy link

Experiencing the same issue.
I believe this has already been reported in #55473.

@Zingam
Copy link
Contributor

Zingam commented Nov 18, 2023

A duplicate of: #55731

@EugeneZelenko EugeneZelenko added the duplicate Resolved as duplicate label Nov 18, 2023
@EugeneZelenko EugeneZelenko closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-format duplicate Resolved as duplicate
Projects
None yet
Development

No branches or pull requests

5 participants