112d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall// RUN: %clang_cc1 -fsyntax-only -verify %s 212d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall 312d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall// PR12497 412d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCallnamespace test0 { 512d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall class A { 612d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall protected: 712d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall A() {} 812d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall A(const A &) {} 912d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall ~A() {} 1012d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall A &operator=(const A &a) { return *this; } 1112d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall }; 1212d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall 1312d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall class B : public A {}; 1412d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall 1512d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall void test() { 1612d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall B b1; 1712d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall B b2 = b1; 1812d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall b1 = b2; 1912d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall } 2012d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6John McCall} 21