aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx0x-deleted-default-ctor.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-10-20 21:14:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-10-20 21:14:49 +0000
commit36981b17ed939300f6f8fc2355a255f711fcef71 (patch)
treeee2483e98b09cac943dc93a6969d83ca737ff139 /test/SemaCXX/cxx0x-deleted-default-ctor.cpp
parent180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (diff)
downloadsrc-36981b17ed939300f6f8fc2355a255f711fcef71.tar.gz
src-36981b17ed939300f6f8fc2355a255f711fcef71.zip
Notes
Diffstat (limited to 'test/SemaCXX/cxx0x-deleted-default-ctor.cpp')
-rw-r--r--test/SemaCXX/cxx0x-deleted-default-ctor.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/SemaCXX/cxx0x-deleted-default-ctor.cpp b/test/SemaCXX/cxx0x-deleted-default-ctor.cpp
index dcb6ba2790be..16c56642c06b 100644
--- a/test/SemaCXX/cxx0x-deleted-default-ctor.cpp
+++ b/test/SemaCXX/cxx0x-deleted-default-ctor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
struct non_trivial {
non_trivial();
@@ -118,3 +118,15 @@ struct late_delete {
late_delete();
};
late_delete::late_delete() = default; // expected-error {{would delete it}}
+
+// See also rdar://problem/8125400.
+namespace empty {
+ static union {}; // expected-error {{deleted constructor}} expected-note {{here}}
+ static union { union {}; };
+ static union { struct {}; };
+ static union { union { union {}; }; };
+ static union { union { struct {}; }; };
+ static union { struct { union {}; }; }; // expected-error {{deleted constructor}} expected-note {{here}}
+ static union { struct { struct {}; }; };
+}
+