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 | 6f1e2c6d19a7f1e7d2e169f6a850a04e7e58687d (patch) | |
| tree | e383e153d0f8ed6c4b2eec7698dc4998c63327ff /clang/test/CXX/special/class.ctor/p5-0x.cpp | |
| parent | 74ae3f5a4569a94beeef1a86a01868346d2f58aa (diff) | |
| download | bcm5719-llvm-6f1e2c6d19a7f1e7d2e169f6a850a04e7e58687d.tar.gz bcm5719-llvm-6f1e2c6d19a7f1e7d2e169f6a850a04e7e58687d.zip | |
Finish PR10217: Ensure we say that a special member was implicitly, not
explicitly, deleted in all relevant cases, and explain why.
llvm-svn: 153894
Diffstat (limited to 'clang/test/CXX/special/class.ctor/p5-0x.cpp')
| -rw-r--r-- | clang/test/CXX/special/class.ctor/p5-0x.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/test/CXX/special/class.ctor/p5-0x.cpp b/clang/test/CXX/special/class.ctor/p5-0x.cpp index ceb47d8f3ba..694ab5b1753 100644 --- a/clang/test/CXX/special/class.ctor/p5-0x.cpp +++ b/clang/test/CXX/special/class.ctor/p5-0x.cpp @@ -31,11 +31,9 @@ NotDeleted1b nd1b; // - any non-static data member with no brace-or-equal-initializer is of // reference type, class Deleted2a { - // FIXME: We should explain that the function was implicitly deleted as a - // result of being defaulted, and why. - Deleted2a() = default; // expected-note 4{{explicitly marked deleted here}} - int &a; -}; + Deleted2a() = default; // expected-note 4{{implicitly deleted here}} + int &a; // expected-note 4{{because field 'a' of reference type 'int &' would not be initialized}} +}; Deleted2a d2a; // expected-error {{implicitly-deleted default constructor}} struct Deleted2b { int &&b; // expected-note {{default constructor of 'Deleted2b' is implicitly deleted because field 'b' of reference type 'int &&' would not be initialized}} |

