On 2020/02/04 22:18:23, hanwenn wrote: > On 2020/02/04 20:35:40, Dan Eble wrote: > > I'm running some of my patches through clang-format as I prepare to push them. > > > > This is an example of a kind of change it wants to make: > > > > - const array<int, 2> key {column_rank, dir}; > > + const array<int, 2> key{column_rank, dir}; > > > > Note the space after key. The setting that controls this is > > SpaceBeforeCpp11BracedList. Am I correct that we should use a space here for > > consistency with historical style? > > > > More examples of the effect of the option are in the docs: > > https://releases.llvm.org/9.0.0/tools/clang/docs/ClangFormatStyleOptions.html > > historically, we didn't have C++11, so this wasn't an issue. I'm fine with > whatever you pick. > > With the space seems more coherent with the s p a c e y GNU style.
Personally, the best of two worlds would be if a ping-pong between our current Astyle and clang-format would end up stable after one application of each. That way, putting the code base through both Astyle and clang-format semi-regularly would put it into a form where users of either formatting tool could contribute their changes without affecting already formatted code in the same file. https://codereview.appspot.com/561340043/