[cfe-dev] Clang-format ideas

Daniel Jasper djasper at google.com
Fri Oct 11 12:02:10 PDT 2013


On Fri, Oct 11, 2013 at 1:35 AM, Kim Gräsman <kim.grasman at gmail.com> wrote:

> Thanks, all!
>
> On Thu, Oct 10, 2013 at 5:26 PM, Sean Silva <silvas at purdue.edu> wrote:
> >>>
> >>> 1) As far as I can tell the indentation for continuation lines is
> >>> always 4. Is there a strong reason, or could we add a style option for
> >>> it?
> >>
> >> I don't see why it should be a fixed option. Looks like no one bothered
> >> changing. ;)
> >
> >
> > I've recently encountered one project where the coding standard requires
> > that continuation lines be indented by 1 space, and I found this to be an
> > issue with clang-format's formatting as well; it would be great to make
> this
> > configurable :)
>
> I have a sketchy patch for this that I'll try and clean up and post
> for review as soon as possible.
>

Cool. I certainly agree that this should be an option. We just never got
around to making it one.

The namespace declaration style may be more work, so I'll see if I can
> find some time to figure it out once I'm better acquainted with the
> code base.
>

I would guess that this change is much lower value. Usually you would use
clang-format mostly within editors or on patches that you create and these
will rarely contain the namespace declarations. If they do, it is a matter
of hitting "J" a few times in vim ;-).

Cheers,
Daniel


> Cheers,
> - Kim
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131011/92f2e7c0/attachment.html>


More information about the cfe-dev mailing list