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

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 1 02:15:55 PDT 2018

djasper added a comment.

I don't have very strong opinions here and I agree that we will need to improve the conditional formatting, especially as this kind of ternary-chaining is becoming more popular because of constexpr.

My personal opinion(s):

- I think this is a no-brainer for BreakBeforeTernaryOperators=false
- I'd be ok with the suggestion for BreakBeforeTernaryOperators=true
- I don't think the alignment of "?" and ":" (in the WhitespaceManager) should be always on. I think we'd need a flag for that part

Manuel, Krasimir, WDYT?

  rC Clang


More information about the cfe-commits mailing list