That seems fine. I just wanted to be sure it didn't crash. On 25 Jun 2014 18:30, "Serge Pavlov" <[email protected]> wrote:
> Thank you for review. > > > 2014-06-24 23:24 GMT+07:00 Richard Smith <[email protected]>: > >> LGTM >> >> ================ >> Comment at: test/SemaCXX/type-definition-in-specifier.cpp:44 >> @@ +43,3 @@ >> + void func4(struct t19018 {int qq;} x); // expected-error{{cannot be >> defined in a parameter type}} >> + void func5(struct {int qq;} x); // expected-error{{cannot be defined >> in a parameter type}} >> +}; >> ---------------- >> Does this still work if you put something more complex into the struct >> definition? (For instance, if it tries to reference a member of the >> surrounding struct, or if it has member functions, or similar.) >> > It still works, corresponding testcases are added. However, access to a > member of the surrounding struct is resolved as for nested types, the code: > > struct aaa { > int xx; > void func5(struct { int qq() { return xx; }; } x); > }; > > > produces also a message: > > error: use of non-static data member 'xx' of 'aaa' from nested type '' > > > I don't know if this behavior need to be fixed, as type defined in > prototype itself is erroneous. > > Thanks, > --Serge > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
