<div dir="ltr">Could I ask you to log a defect over in
<a href="https://bugs.llvm.org/">https://bugs.llvm.org</a> to this effect, The examples using
AllowShortIfStatementsOnASingleLine don't include braces <div><br></div><div>MyDeveloperDay</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 3, 2019 at 8:51 PM Michael Pozulp via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-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 dir="ltr">If I build clang-format from tip of master and run it<br>using this .clang-format file<br><br> AllowShortIfStatementsOnASingleLine: Always<br><br>it will change this single line if statement<br><br> if (x) { x++; }<br><br>into this three line if statement<br><br> if (x) {<br> x++;<br> }<br><br>How do I keep it as one line?<br><br>If I delete the braces it stays on one line, but the<br>style guide for the code I work on says the braces are<br>required. If I modify my .clang-format file to be<br><br> AllowShortIfStatementsOnASingleLine: Always<br> AllowShortBlocksOnASingleLine: Always<br><br>it stays on one line, but I don't want all short blocks<br>on a single line, just the if statement block. Any ideas?</div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>