diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-11 20:24:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-11 20:24:17 +0000 |
commit | bbbe074566a8defed299ff676bc65b3631861768 (patch) | |
tree | 8b70d4484b997887ce835dcfe1d4a5239bf15e67 /test/SemaCXX/default-assignment-operator.cpp | |
parent | 92dd1915842410005c68d32c43bb3b3cf5a4a702 (diff) |
Do not mark the virtual members of an implicitly-instantiated class as
referenced unless we see one of them defined (or the key function
defined, if it as one) or if we need the vtable for something. Fixes
PR7114.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/default-assignment-operator.cpp')
-rw-r--r-- | test/SemaCXX/default-assignment-operator.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/SemaCXX/default-assignment-operator.cpp b/test/SemaCXX/default-assignment-operator.cpp index 4b5531e0c8..0be5df39b1 100644 --- a/test/SemaCXX/default-assignment-operator.cpp +++ b/test/SemaCXX/default-assignment-operator.cpp @@ -7,7 +7,8 @@ class Base { // expected-error {{cannot define the implicit default assignment o }; class X : Base { // // expected-error {{cannot define the implicit default assignment operator for 'X', because non-static const member 'cint' can't use default assignment operator}} \ -// expected-note{{assignment operator for 'Base' first required here}} +// expected-note{{assignment operator for 'Base' first required here}} \ + // expected-note{{implicit default copy assignment operator}} public: X(); const int cint; // expected-note {{declared here}} @@ -28,7 +29,8 @@ Z z2; // Test1 void f(X x, const X cx) { - x = cx; // expected-note{{assignment operator for 'X' first required here}} + x = cx; // expected-note{{assignment operator for 'X' first required here}} \ + // expected-note{{implicit default copy assignment operator}} x = cx; z1 = z2; } @@ -84,7 +86,9 @@ public: E1 e1, e2; void j() { - e1 = e2; // expected-note{{assignment operator for 'E1' first required here}} + // FIXME: duplicated! + e1 = e2; // expected-note{{assignment operator for 'E1' first required here}} \ + // expected-note{{implicit default copy assignment operator}} } namespace ProtectedCheck { @@ -101,7 +105,8 @@ namespace ProtectedCheck { X x; }; - void f(Z z) { z = z; } // + void f(Z z) { z = z; } // expected-note{{implicit default copy assignment operator}} + } namespace MultiplePaths { |