diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-02 20:59:25 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-02 20:59:25 +0000 |
commit | 5bdaac5454d93d1dcdc2319818497b685be56fcf (patch) | |
tree | fbf67c57fa5cdd443d079a9f6f149baf2535f57a /test/SemaCXX | |
parent | 460ef136eb96b879f149c8703938a13c35b4bc68 (diff) |
Finish PR10217: Ensure we say that a special member was implicitly, not
explicitly, deleted in all relevant cases, and explain why.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r-- | test/SemaCXX/cxx0x-deleted-default-ctor.cpp | 6 | ||||
-rw-r--r-- | test/SemaCXX/dr1301.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/SemaCXX/cxx0x-deleted-default-ctor.cpp b/test/SemaCXX/cxx0x-deleted-default-ctor.cpp index a5eaa352e4..0cebc10ade 100644 --- a/test/SemaCXX/cxx0x-deleted-default-ctor.cpp +++ b/test/SemaCXX/cxx0x-deleted-default-ctor.cpp @@ -59,7 +59,7 @@ struct good_const { good_const gc; struct no_default { - no_default() = delete; // expected-note 2{{deleted here}} + no_default() = delete; // expected-note 3{{deleted here}} }; struct no_dtor { ~no_dtor() = delete; // expected-note 2{{deleted here}} @@ -108,8 +108,8 @@ struct has_friend { has_friend hf; struct defaulted_delete { - no_default nd; - defaulted_delete() = default; // expected-note{{deleted here}} + no_default nd; // expected-note {{because field 'nd' has a deleted default constructor}} + defaulted_delete() = default; // expected-note{{implicitly deleted here}} }; defaulted_delete dd; // expected-error {{call to implicitly-deleted default constructor}} diff --git a/test/SemaCXX/dr1301.cpp b/test/SemaCXX/dr1301.cpp index c92ff9b714..ec0db74554 100644 --- a/test/SemaCXX/dr1301.cpp +++ b/test/SemaCXX/dr1301.cpp @@ -6,7 +6,7 @@ struct A { // expected-note 2{{candidate}} int a = A().n; // expected-error {{no matching constructor}} struct B { - B() = delete; // expected-note 2{{here}} + B() = delete; // expected-note 3{{here}} int n; }; int b = B().n; // expected-error {{call to deleted}} @@ -18,7 +18,7 @@ int c = C().b.n; // expected-error {{call to implicitly-deleted default}} struct D { D() = default; // expected-note {{here}} - B b; + B b; // expected-note {{'b' has a deleted default constructor}} }; int d = D().b.n; // expected-error {{call to implicitly-deleted default}} |