<div dir="ltr">Generally the goal of clang-format is to only modify whitespace (I think sorting includes is one place where that goal is intentionally violated, so it's not a completely hard rule. -though includes may be easier to identify with certainty and modify with some certainty it shouldn't affect the result), so (1) would be out of scope for clang-format, and appropriately implemented in clang-tidy as you've seen.<br><br>Can't say I know much about (2) - seems like it could be implemented, but probably not something anyone's tried to do, I would've thought - so I doubt there's much infrastructure for it.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 18, 2021 at 10:44 AM saloni goyal 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 dir="ltr"> Hello!<div><br>I am working on a clang format. I want to customize it:<div><br></div><div>1. For if-else condition I want that for one line statement written in multiple lines should get wrapped in braces and also if there are only nested if-else then that code should be wrapped in braces. I have seen clang-tidy and in that google-readability-braces-around-statements.ShortStatementLines with value 2 gives expected results to me but I want that it should be done with clang-format.</div><div><br></div><div>2. For some comments the indent level should be more or the clang-format should accept some comment intend level as it. </div><div><br></div><div>I want to make these changes in my clang-format. Please can you suggest some way to get these results?</div><div><br></div><div>Regards</div><font color="#888888"><div>Saloni</div><div><br></div></font></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>