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