xref: /llvm-project/clang/test/CXX/class.access/class.protected/p1-cxx11.cpp (revision c6e68daac0fa6e77a89f3ca72f266a528503dd1c)
1d4274214SJohn McCall // RUN: %clang_cc1 -fsyntax-only -verify %s
2*c6e68daaSAndy Gibbs // expected-no-diagnostics
3d4274214SJohn McCall 
4d4274214SJohn McCall // PR12497
5d4274214SJohn McCall namespace test0 {
6d4274214SJohn McCall   class A {
7d4274214SJohn McCall   protected:
A()8d4274214SJohn McCall     A() {}
A(const A &)9d4274214SJohn McCall     A(const A &) {}
~A()10d4274214SJohn McCall     ~A() {}
operator =(const A & a)11d4274214SJohn McCall     A &operator=(const A &a) { return *this; }
12d4274214SJohn McCall   };
13d4274214SJohn McCall 
14d4274214SJohn McCall   class B : public A {};
15d4274214SJohn McCall 
test()16d4274214SJohn McCall   void test() {
17d4274214SJohn McCall     B b1;
18d4274214SJohn McCall     B b2 = b1;
19d4274214SJohn McCall     b1 = b2;
20d4274214SJohn McCall   }
21d4274214SJohn McCall }
22