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

AllowShortIfStatementsOnASingleLine don't work with else if constexpr statement #49363

Closed
jfalcou mannequin opened this issue Apr 18, 2021 · 3 comments
Closed

AllowShortIfStatementsOnASingleLine don't work with else if constexpr statement #49363

jfalcou mannequin opened this issue Apr 18, 2021 · 3 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla clang-format

Comments

@jfalcou
Copy link
Mannequin

jfalcou mannequin commented Apr 18, 2021

Bugzilla Link 50019
Resolution FIXED
Resolved on May 03, 2021 09:13
Version trunk
OS Linux
CC @mkurdej
Fixed by commit(s) 8d93d7f

Extended Description

AllowShortIfStatementsOnASingleLine: Always
doesn't behave properly with else, else if and else if constexpr clauses.

https://godbolt.org/z/oxYTcxere

@jfalcou
Copy link
Mannequin Author

jfalcou mannequin commented Apr 18, 2021

assigned to @mkurdej

@mkurdej
Copy link
Member

mkurdej commented Apr 18, 2021

Tentative fix: https://reviews.llvm.org/D100727.

@mkurdej
Copy link
Member

mkurdej commented May 3, 2021

Fixed in https://reviews.llvm.org/rG8d93d7ffedebc5f18dee22ba954d38a1d2d0affa. You'd need to use AllowShortIfStatementsOnASingleLine: AllIfsAndElse because AllowShortIfStatementsOnASingleLine: Always has kept the old behaviour not to break the backwards compatibility.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
This issue was closed.
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
Projects
None yet
Development

No branches or pull requests

1 participant