You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
308 B
22 lines
308 B
4 months ago
|
// 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;
|
||
|
}
|
||
|
}
|