diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-05-04 20:51:19 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-05-04 20:51:19 +0000 |
commit | 7e411337c0ed226dace6e07f1420486768161308 (patch) | |
tree | 938fcb7c80a0402925b5b00fa684a245ab0936a5 /test/SemaCXX/default-assignment-operator.cpp | |
parent | 8aaf5818a64e9f7687798852af5945b053c68a54 (diff) | |
download | FreeBSD-src-7e411337c0ed226dace6e07f1420486768161308.zip FreeBSD-src-7e411337c0ed226dace6e07f1420486768161308.tar.gz |
Update clang to r103052.
Diffstat (limited to 'test/SemaCXX/default-assignment-operator.cpp')
-rw-r--r-- | test/SemaCXX/default-assignment-operator.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/SemaCXX/default-assignment-operator.cpp b/test/SemaCXX/default-assignment-operator.cpp index a04de37..dee6d13 100644 --- a/test/SemaCXX/default-assignment-operator.cpp +++ b/test/SemaCXX/default-assignment-operator.cpp @@ -89,3 +89,31 @@ void j() { e1 = e2; } +namespace ProtectedCheck { + struct X { + protected: + X &operator=(const X&); // expected-note{{declared protected here}} + }; + + struct Y : public X { }; + + void f(Y y) { y = y; } + + struct Z { // expected-error{{'operator=' is a protected member of 'ProtectedCheck::X'}} + X x; + }; + + void f(Z z) { z = z; } // +} + +namespace MultiplePaths { + struct X0 { + X0 &operator=(const X0&); + }; + + struct X1 : public virtual X0 { }; + + struct X2 : X0, X1 { }; + + void f(X2 x2) { x2 = x2; } +} |