[PATCH] D59087: [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 10 05:59:39 PDT 2019


MyDeveloperDay planned changes to this revision.
MyDeveloperDay added a comment.

In D59087#1423942 <https://reviews.llvm.org/D59087#1423942>, @reuk wrote:

> Does it make sense to allow `AllowShortIfElseStatementsOnASingleLine` to be enabled when `AllowShortIfStatementsOnASingleLine` is not?
>
> Perhaps it would be better to have `AllowShortIfStatementsOnASingleLine` be represented by an enum with values `Never`, `WithoutElse`, `Always`. The old `true/false` values from config files prior to this change would need to be made to map to the appropriate enum keys.


Thats a good point...its probably more code but I think it might be a better approach


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59087/new/

https://reviews.llvm.org/D59087





More information about the cfe-commits mailing list