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