[cfe-commits] [PATCH] Bug 6484 - Improve diagnostics for dangling '}'

Jason Switzer jswitzer at gmail.com
Sun Jan 15 10:39:53 PST 2012


On Sun, Jan 15, 2012 at 10:08 AM, Dmitri Gribenko <gribozavr at gmail.com>wrote:

> A nice idea, but the implementation is not really correct.  Please
> take a look at Parser::ParseExternalDeclaration in
> llvm/tools/clan/lib/Parse/Parser.cpp:
> err_expected_external_declaration is emitted in three cases, and only
> one is the case of extra brace.  For example,
> $ cat > a.c
> +
> $ clang a.c
> a.c:1:1: error: expected external declaration
> +
> ^
> 1 error generated.
>
> So I think you should add other (new) error message and change the
> relevant case in Parser.cpp.


Ahh, okay. I was going by the test cases and the only test case for this
error was the extraneous closing brace. I will rework and resubmit, thanks.

-Jason "s1n" Switzer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120115/10c3622f/attachment.html>


More information about the cfe-commits mailing list