On Tue, Aug 13, 2013 at 1:48 AM, Klemens Baum <[email protected]> wrote:

>
>   For the Phrabricator issue: I tried uploading a full-context diff [here](
> http://llvm-reviews.chandlerc.com/differential/diff/3416/). If you expand
> FormatTest.cpp, you'll see that it gets truncated at line 5782.
>

Can you give me the command line you used to generate the patch, then I'll
file an upstream bug. Thanks!


>
>
> ================
> Comment at: ../tools/clang/lib/Format/Format.cpp:656
> @@ +655,3 @@
> +      } else if (Current.Type == TT_CtorInitializerComma) {
> +        assert(Style.BreakConstructorInitializersBeforeComma);
> +        State.Column = State.Stack.back().Indent;
> ----------------
> Daniel Jasper wrote:
> > Klemens Baum wrote:
> > > Daniel Jasper wrote:
> > > > Do not assert!!! This is easy to force by user input, e.g. by:
> > > >
> > > >   Constructor::Constructor() : a(a) // a
> > > >   , b(b) {}
> > > >
> > > > It's fine not to format perfectly in that case, but we shouldn't
> crash.
> > > Since this whole block is within the `if (Newline)`, `Current` refers
> to the first token to emit on that line. Unless we are using the
> BreakConstructorInitializersBeforeComma style, it cannot be an initializer
> list comma token. So I don't think this can be triggered by user input.
> > Well, I have given you the user input that triggers it.
> Oh, right. I didn't realize that comment was there.
>
>
> http://llvm-reviews.chandlerc.com/D1360
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to