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 doesn't remove braces if } else if (...) {barely doesn't fit #59778

Closed
owenca opened this issue Jan 1, 2023 · 2 comments
Closed
Assignees

Comments

@owenca
Copy link
Contributor

owenca commented Jan 1, 2023

Version: 15 and main

% cat test.cpp
if (foo) {
  f();
} else if (bar || baz) {
  g();
}
% clang-format -style='{ColumnLimit: 20, RemoveBracesLLVM: true}'  test.cpp
if (foo) {
  f();
} else if (bar ||
           baz) {
  g();
}

Expected:

if (foo)
  f();
else if (bar || baz)
  g();
@owenca owenca self-assigned this Jan 1, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 1, 2023

@llvm/issue-subscribers-clang-format

@owenca
Copy link
Contributor Author

owenca commented Jan 2, 2023

@owenca owenca added the awaiting-review Has pending Phabricator review label Jan 2, 2023
@owenca owenca closed this as completed in 5751c43 Jan 5, 2023
@github-actions github-actions bot removed the awaiting-review Has pending Phabricator review label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants