1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // expected-no-diagnostics 3 4 // PR12497 5 namespace test0 { 6 class A { 7 protected: A()8 A() {} A(const A &)9 A(const A &) {} ~A()10 ~A() {} operator =(const A & a)11 A &operator=(const A &a) { return *this; } 12 }; 13 14 class B : public A {}; 15 test()16 void test() { 17 B b1; 18 B b2 = b1; 19 b1 = b2; 20 } 21 } 22