aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-init.cpp')
-rw-r--r--test/SemaTemplate/instantiate-init.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-init.cpp b/test/SemaTemplate/instantiate-init.cpp
index 22c70be3a8dc..e9be60d16c1f 100644
--- a/test/SemaTemplate/instantiate-init.cpp
+++ b/test/SemaTemplate/instantiate-init.cpp
@@ -115,6 +115,7 @@ namespace PR13064 {
struct A { explicit A(int); }; // expected-note{{here}}
template<typename T> struct B { T a { 0 }; };
B<A> b;
+ // expected-note@+1 {{in instantiation of default member initializer}}
template<typename T> struct C { T a = { 0 }; }; // expected-error{{explicit}}
C<A> c; // expected-note{{here}}
}
@@ -133,3 +134,12 @@ namespace PR16903 {
fun(in);
}
}
+
+namespace ReturnStmtIsInitialization {
+ struct X {
+ X() {}
+ X(const X &) = delete;
+ };
+ template<typename T> X f() { return {}; }
+ auto &&x = f<void>();
+}