summaryrefslogtreecommitdiff
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.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/SemaTemplate/instantiate-init.cpp b/test/SemaTemplate/instantiate-init.cpp
index f0ca9a5b21e9..612a0b7f621c 100644
--- a/test/SemaTemplate/instantiate-init.cpp
+++ b/test/SemaTemplate/instantiate-init.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
-struct X0 { // expected-note 4{{candidate}}
+struct X0 { // expected-note 8{{candidate}}
X0(int*, float*); // expected-note 4{{candidate}}
};
@@ -107,3 +107,14 @@ namespace PR7985 {
array_lengthof(Description<float*>::data); // expected-error{{no matching function for call to 'array_lengthof'}}
}
}
+
+namespace PR13064 {
+ // Ensure that in-class direct-initialization is instantiated as
+ // direct-initialization and likewise copy-initialization is instantiated as
+ // copy-initialization.
+ struct A { explicit A(int); }; // expected-note{{here}}
+ template<typename T> struct B { T a { 0 }; };
+ B<A> b;
+ template<typename T> struct C { T a = { 0 }; }; // expected-error{{explicit}}
+ C<A> c; // expected-note{{here}}
+}