<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 30, 2020 at 10:55 AM Matt Arsenault via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><br><div><br><blockquote type="cite"><div>On Jun 28, 2020, at 11:30, MyDeveloper Day via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><p style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:15.008px">I’m a contributor to clang-format and would like to see LLVM 100% clang formatted so we can use LLVM as a massive test-suite for clang-format when we make changes.</p><br></div></blockquote></div><br><div>My main issue with this would be that clang-format does things that I don’t believe are stated in the LLVM style guide and I also disagree with. There’s a whole set of cases where it makes unwelcome changes to put things that were on separate lines on a single line. Whenever I run clang-format, I typically git checkout -p to discard all of these.</div><div><br></div><div>For example, it likes to take member initializer lists and pack them into as few lines as possible. </div></div></blockquote><div>Note that this is solvable.  Put a comma at the end of your initializer list, always.  This works for enums, array initializers, and AFAIK just arbitrary cases of comma separated things between curly braces.  I personally think that it's absolutely ridiculous that this "hack" exists and that there is no proper clang-format style option, but then again..  I haven't proposed or contributed a fix, so I'm not exactly helping.</div><div><br></div><div> </div></div></div>