diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaTemplate/instantiate-init.cpp | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/SemaTemplate/instantiate-init.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-init.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/SemaTemplate/instantiate-init.cpp b/test/SemaTemplate/instantiate-init.cpp index f0ca9a5..612a0b7 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}} +} |