[Lldb-commits] [PATCH] Add a .clang-format file to enhance formatting experience with clang-format

Chandler Carruth chandlerc at gmail.com
Tue Jul 22 14:38:01 PDT 2014


(peanut gallery comment from LLVm and Clang communities and a happy
clang-format user)

One thing to keep in mind is that clang-format is just a tool. You can use
it, but you can also not use it when it doesn't serve your purpose. I still
will at times manually format code correctly precisely because there is an
art to laying it out so it looks clear. I just use clang-format to get me
close to this first (often surprisingly close). And you can always just
ignore it...

On Tue, Jul 22, 2014 at 2:29 PM, David Majnemer <david.majnemer at gmail.com>
wrote:

> More importantly, there's somewhat of an art to laying out code so it
>> looks clear and is easy to read.  These tools tend to make uglify such
>> attempts, in my experience.
>>
>
> clang-format has been, by all accounts that I know of, a smashing success
> in Clang and LLVM.  It is regularly used by many of the contributors and is
> often explicitly referenced when we see new code up for review that is not
> compliant with the coding standards.
>

You might ask Jim Grosbach from LLVM land or some of the Clang hackers you
know who are using clang-format regularly and successfully? They might be
able to share experiences, pros, cons, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140722/1311f3fe/attachment.html>


More information about the lldb-commits mailing list