From: Douglas Gregor Date: Mon, 9 Nov 2009 18:29:00 +0000 (+0000) Subject: Slightly more testing for instantiation of non-type template parameters in nested... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11a82401eaf3396dfb6466fa691a606204c8ddb0;p=clang Slightly more testing for instantiation of non-type template parameters in nested templates, for my own sanity's sake git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86570 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaTemplate/instantiate-member-template.cpp b/test/SemaTemplate/instantiate-member-template.cpp index 36f3b6fd49..95556bcc22 100644 --- a/test/SemaTemplate/instantiate-member-template.cpp +++ b/test/SemaTemplate/instantiate-member-template.cpp @@ -103,3 +103,16 @@ void test_X1(int *ip, int i, double *dp) { X1::Inner4::value = 17; i = X1::Inner4::value; // expected-note{{instantiation}} } + + +template +struct X2 { + template // expected-error{{pointer to a reference}} + struct Inner; + + template // expected-error{{cannot have type 'float'}} + struct Inner2; +}; + +X2 x2a; // expected-note{{instantiation}} +X2 x2b; // expected-note{{instantiation}}