[PATCH] D50078: clang-format: support aligned nested conditionals formatting

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 27 02:07:55 PDT 2020


MyDeveloperDay added a comment.

In D50078#2055609 <https://reviews.llvm.org/D50078#2055609>, @Typz wrote:

> In D50078#2055227 <https://reviews.llvm.org/D50078#2055227>, @srj wrote:
>
> > > And I also think it should be on by default instead of modifying many .clang-format files. So IMHO if we add an option, it should be opt-out.
> >
> > I can live with it being opt-out. My big concern is that (as it currently stands) our project gets different 'canonical' clang-format results depending on whether people are using LLVM10 vs LLVM11 (and both are common and supported by our project), which is a headache. I just want a way to get consistent, predictable formatting regardless of the clang-format version.
>
>
> Adding an option would be an issue there, I think: since clang-format is quite strict regarding options, the option would need to exist in both LLVM10 and LLVM11 if you need to support such use-case...


The problem here is not that clang-format 10 and 11 are different because they are already different for other bug fixes and we are not providing version to version emulation of bugs just because someone wants to use clang-format-10 and clang-format-11 in the same environment.

The problem is that this team is allowing their developers to mix and match versions, its not for clang-format to solve that problem, that is one of process, a process that could easily be different for other teams (they could be using 7,8,9,10) in such a circumstance we'd say "pick one" the same needs to be true here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D50078





More information about the cfe-commits mailing list