llvm-for-llvmta/tools/clang/test/CXX/class.access/class.protected/p1-cxx11.cpp

22 lines
308 B
C++
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics
// 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;
}
}