[cfe-dev] Doubts regarding clang-format

Andi-Bogdan Postelnicu via cfe-dev cfe-dev at lists.llvm.org
Wed May 26 01:48:36 PDT 2021


Running this on a large code base, it breaks a lot.

> On 26 May 2021, at 09:32, Zachary Turner <zturner at roblox.com> wrote:
> 
> Why didn’t this get merged?  It has an LGTM.
> 
> On Tue, May 25, 2021 at 11:14 PM Tiago Macarios via cfe-dev <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
> For 1. see https://reviews.llvm.org/D95168 <https://reviews.llvm.org/D95168>
> 
> 
> On Tue, May 25, 2021 at 10:35 PM Andi-Bogdan Postelnicu via cfe-dev <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
> 
> 
> > On 26 May 2021, at 04:49, saloni goyal via cfe-dev <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
> > 
> > 
> > Hello!
> > 
> > I am working on a clang format. I want to customize it:
> > 
> > 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.
> > 
> There is a reason why this has been done through the AST, it much easier to manipulate the source range when you have the ast data then when you only have the lexer.
> 
> > 2. For some comments the intend level should be more or the clang-format should accept some comment intend level as it. 
> > 
> > I want to make these changes in my clang-format. Please can you suggest some way to get these results?
> Can you paste a sample of before and after, on what are you trying to achieve?
> > 
> > Regards
> > Saloni
> > 
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210526/4dedc4f9/attachment.html>


More information about the cfe-dev mailing list