[cfe-commits] r67672 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Parse/Parser.cpp lib/Sema/Sema.h lib/Sema/SemaDeclCXX.cpp test/SemaCXX/constructor-initializer.cpp test/SemaCXX/nested-name-spec.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Wed Mar 25 11:57:05 PDT 2009


Anders Carlsson wrote:
> Author: andersca
> Date: Tue Mar 24 21:58:17 2009
> New Revision: 67672
>
> URL: http://llvm.org/viewvc/llvm-project?rev=67672&view=rev
> Log:
> Improve handling of base initializers. We now parse initializers in out of line decls, such as:
>
> class C {
>     C() { }
>     
>     int a;
> };
>
> C::C() : a(10) { }
>
> We also diagnose when initializers are used on declarations that aren't constructors:
>
> t.cpp:1:10: error: only constructors take base initializers
> void f() : a(10) { }
>          ^
>
> Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.)
>   
Looks fine to me.

Sebastian



More information about the cfe-commits mailing list