From: Richard Smith Date: Tue, 22 Jul 2014 23:56:53 +0000 (+0000) Subject: PR14615: add (passing) tests for this already-fixed bug X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ffcd702b01962d5547a2c4abc175730f6026190;p=clang PR14615: add (passing) tests for this already-fixed bug git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213709 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaTemplate/pack-deduction.cpp b/test/SemaTemplate/pack-deduction.cpp index f3f969e9af..84eefa63d2 100644 --- a/test/SemaTemplate/pack-deduction.cpp +++ b/test/SemaTemplate/pack-deduction.cpp @@ -37,3 +37,31 @@ namespace RetainExprPacks { template int g(X, decltype(f(Ts()...))); int n = g(X(), 0); } + +namespace PR14615 { + namespace comment0 { + template struct X {}; + template struct X { + typedef int type; + struct valid {}; + }; + template , + typename = typename T::valid> + typename T::type check(int); + int i = check(1); + } + + namespace comment2 { + template struct X; + template ::type I = 0> + char check(B...); // expected-note {{undefined template 'PR14615::comment2::X'}} + void f() { check(1, 2); } // expected-error {{no matching function}} + } + + namespace comment3 { + template struct X; + template ::type I = (typename X::type)0> + char check(B...); // expected-note {{undefined template 'PR14615::comment3::X'}} + void f() { check(1, 2); } // expected-error {{no matching function}} + } +}