diff options
author | Anders Carlsson <andersca@mac.com> | 2009-07-09 17:47:25 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-07-09 17:47:25 +0000 |
commit | 5e09d4c96dc2846cc1fc75f80f5632612247354b (patch) | |
tree | 0b35b0089da218d6dc0c63176e7a66e556092bc2 /test/SemaCXX/default-assignment-operator.cpp | |
parent | 0d5dc8e23133d0b8d8d8e6d81834f4d11923dc82 (diff) |
Use getDeclName in DefineImplicitOverloadedAssign as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/default-assignment-operator.cpp')
-rw-r--r-- | test/SemaCXX/default-assignment-operator.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/default-assignment-operator.cpp b/test/SemaCXX/default-assignment-operator.cpp index 090ba3c3ca..64ea49837b 100644 --- a/test/SemaCXX/default-assignment-operator.cpp +++ b/test/SemaCXX/default-assignment-operator.cpp @@ -72,3 +72,19 @@ void i() d1 = d2; } +// Test5 + +class E1 { // expected-error{{cannot define the implicit default assignment operator for 'class E1', because non-static const member 'a' can't use default assignment operator}} +public: + const int a; // expected-note{{declared at}} + E1() : a(0) {} + +}; + +E1 e1, e2; + +void j() +{ + e1 = e2; // expected-note{{synthesized method is first required here}} +} + |