summaryrefslogtreecommitdiff
path: root/clang/test/CXX/class.access/class.protected/p1-cxx11.cpp
blob: dc9b20d17c0e374376a6314e266cb6a230c7a63f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -fsyntax-only -verify %s

// PR12497
namespace test0 {
  class A {
  protected:
    A() {}
    A(const A &) {}
    ~A() {}
    A &operator=(const A &a) { return *this; }
  };

  class B : public A {};

  void test() {
    B b1;
    B b2 = b1;
    b1 = b2;
  }
}