[cfe-commits] [patch] Make the "unexpected ':'" warning faster to parse

Richard Smith richard at metafoo.co.uk
Fri Apr 27 16:14:55 PDT 2012


On Fri, Apr 27, 2012 at 2:29 PM, Nico Weber <thakis at chromium.org> wrote:

> Hi,
>
> the attached patch changes
>
>  test.cc:4:11: error: unexpected ':' in nested name specifier
>    return A:a;
>            ^
>            ::
>  1 error generated.
>
> to
>
>  test.cc:4:11: error: unexpected ':' in nested name specifier, did
> you mean '::'?
>    return A:a;
>            ^
>            ::
>  1 error generated.
>
>
> True, there's a fixit for the '::' already, but it always takes me a
> second to see that. One coworker asked for the same change. Is this
> change ok? (The diagnostic is only used in one place, and always shows
> the '::' fixit.)


Hi Nico,

This seems fine to me. It's easy to not notice a small fixit like this, and
we already have plenty of 'did you mean' diagnostics with matching fixits.
Please use ';' rather than ',' before the 'did you mean' to match the
existing diagnostics; LGTM other than that.

Thanks!
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120427/9c45f9bd/attachment.html>


More information about the cfe-commits mailing list