aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx0x-deleted-default-ctor.cpp
diff options
context:
space:
mode:
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 {}; }; };
+}
+