[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 1 07:03:32 PST 2018


djasper added a comment.

In https://reviews.llvm.org/D42684#1022219, @Typz wrote:

> Indeed, seems to apply to classes as well. Maybe I was mislead by my testing, where I did not get the case (possibly because we use `ConstructorInitializerAllOnOneLineOrOnePerLine=true`, so the continuation indenter only sees "short" class declarations unless breaking the template is required because the name is too long).


Not sure how that style flag is related to class declarations, but ok ;).

> So just to be clear, are you saying the whole approach is not the right one, or simply that the "names" of each modes are not?
>  For the name, maybe something like may be better:
> 
> - `Never`
> - `MultiLineDeclaration`, or maybe even `MultiLine`
> - `Always`

Ah, yeah, maybe it's just the name. "AlwaysBreak: Never" and "AlwaysBreak: Always" seem not very intuitive to interpret, though. How about just: No, Yes, MultiLine?


Repository:
  rC Clang

https://reviews.llvm.org/D42684





More information about the cfe-commits mailing list