[PATCH] D90232: [clang-format] Formatting constructor initializer lists by putting them always on different lines (update to D14484)

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 1 02:18:21 PDT 2021


MyDeveloperDay added a comment.

> A small task that will make a lot of people happy

Its not the happy people that concern me, its those who end up not happy that cause us the most pain ;-)

1. I question if the rst was generated via docs/tools/dump_format_style.py or by hand, it has to be generated so it stay in lock step.
2. We need to keep the old style and just make it initialise your new style if present, the easiest way of doing that is take the old style to be an enum, have the parser handle true/false, then provide a mapping of the name "if you cannot stomach the old option name"
  - people use the latest version doc to look things up, they don't always find the doc for their version
  - we cannot have the 100,000 of uses of the old option cause a runtime failure or cause people to be confused because they cannot find it in the docs (we have to give them a reference even it its a "use this now")
  - we can add a new style and put a big note on the old name to say its been deprecated

3. Fundamentally this patch looks ok, I would like to see more cases where the `:` wasn't always on a new line
4. I'd like to know how this is impacted by the new "AfterComma" style


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90232



More information about the cfe-commits mailing list