summaryrefslogtreecommitdiff
path: root/test/CXX/dcl.decl/dcl.init/p7.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/dcl.decl/dcl.init/p7.cpp')
-rw-r--r--test/CXX/dcl.decl/dcl.init/p7.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CXX/dcl.decl/dcl.init/p7.cpp b/test/CXX/dcl.decl/dcl.init/p7.cpp
new file mode 100644
index 000000000000..03216f4c28ac
--- /dev/null
+++ b/test/CXX/dcl.decl/dcl.init/p7.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+struct NotAggregateBase {};
+
+struct A : NotAggregateBase {
+private:
+ A() = default; // expected-note {{here}}
+};
+A a = {}; // expected-error {{calling a private constructor}}
+
+struct B : NotAggregateBase {
+ explicit B() = default; // expected-note {{here}}
+};
+B b = {}; // expected-error {{chosen constructor is explicit}}