Skip to content
This repository has been archived by the owner. It is now read-only.

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

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

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

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

Comments

@jfalcou
Copy link
Mannequin

@jfalcou 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) 8d93d7ffedebc5f18dee22ba954d38a1d2d0affa

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 jfalcou mannequin commented Apr 18, 2021

assigned to @mkurdej

Loading

@mkurdej
Copy link
Member

@mkurdej mkurdej commented Apr 18, 2021

Loading

@mkurdej
Copy link
Member

@mkurdej 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.

Loading

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant