1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 3 struct A { 4 virtual void f() = 0; // expected-note{{unimplemented pure virtual method}} 5 }; 6 7 struct B : A { 8 virtual void f(); 9 }; 10 11 struct C : B { 12 virtual void f() = 0; // expected-note 2{{unimplemented pure virtual method}} 13 }; 14 15 struct D : C { 16 }; 17 18 void test() { 19 (void)new A; // expected-error{{abstract class}} 20 (void)new B; 21 (void)new C; // expected-error{{abstract class}} 22 (void)new D; // expected-error{{abstract class}} 23 } 24