1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // Don't crash (PR18284). 3 4 namespace n1 { 5 class A { }; 6 class C { A a; }; 7 8 A::RunTest() {} // expected-error {{C++ requires a type specifier for all declarations}} 9 10 void f() { 11 new C; 12 } 13 } // namespace n1 14 15 namespace n2 { 16 class A { }; 17 class C : public A { }; 18 19 A::RunTest() {} // expected-error {{C++ requires a type specifier for all declarations}} 20 21 void f() { 22 new C; 23 } 24 } // namespace n2 25