[PATCH] Adds IndentationWidth to FormatStyle (clang-format)

Alexander Kornienko alexfh at google.com
Mon May 6 07:37:16 PDT 2013

Thank you for the patch. Indentation width is an important setting to
configure. However, having a command-line option just for it doesn't seem
to be a good idea. We could either expose all formatting options as
command-line flags or read them from configuration files. The latter seems
more usable, and we've already started working on support for configuration

As for the rest of the patch, it looks rather reasonable, but it definitely
needs tests.

On Sun, May 5, 2013 at 7:44 PM, Nitram Aw <nitramaw at gmail.com> wrote:

> Clang-format seems to be hard coded to use two space width indentation.
> To make it useful to a broader audience I suggest getting rid of this
> limitation
> by letting it be part of the FormatStyle.
> I added IndentationWidth to FormatStyle.
> I used IndentationWidth instead of 2 the places that seem most important.
> I added -iw as a switch to clang-format to override selected style.
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Alexander Kornienko | Software Engineer | alexfh at google.com | +49 151 221
77 957
Google Germany GmbH | Dienerstr. 12 | 80331 M√ľnchen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130506/713e0b36/attachment.html>

More information about the cfe-commits mailing list