[cfe-commits] r68919 - in /cfe/trunk: lib/Parse/ParseDecl.cpp test/Parser/cxx-decl.cpp test/SemaCXX/nested-name-spec.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Sun Apr 12 15:29:41 PDT 2009


Chris Lattner wrote:
> Author: lattner
> Date: Sun Apr 12 17:23:27 2009
> New Revision: 68919
>
> URL: http://llvm.org/viewvc/llvm-project?rev=68919&view=rev
> Log:
> Fix some C++ error recovery problems in init declarator parsing
> that I noticed working on other things.
>
> Instead of emitting:
>
> t2.cc:1:8: error: use of undeclared identifier 'g'
> int x(*g);
>        ^
> t2.cc:1:10: error: expected ')'
> int x(*g);
>          ^
> t2.cc:1:6: note: to match this '('
> int x(*g);
>      ^
>
> We now only emit:
>
> t2.cc:1:7: warning: type specifier missing, defaults to 'int'
> int x(*g);
>       ^
>   
Aside from the parenthesis errors gone, this feels like a regression.
The line looks like a declaration of an integer 'x', initialized with
the result of dereferencing the (sadly non-existent) pointer 'g'. It
doesn't strike me as a function declaration.

The real question is, why does it complain about the missing parenthesis?

Sebastian



More information about the cfe-commits mailing list