From a8ab71bad7826ef51a90fba29f50cc5a37eafadf Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 9 Nov 2009 18:29:00 +0000 Subject: [PATCH] Slightly more testing for instantiation of non-type template parameters in nested templates, for my own sanity's sake llvm-svn: 86570 --- .../SemaTemplate/instantiate-member-template.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/clang/test/SemaTemplate/instantiate-member-template.cpp b/clang/test/SemaTemplate/instantiate-member-template.cpp index 36f3b6fd490d..95556bcc221b 100644 --- a/clang/test/SemaTemplate/instantiate-member-template.cpp +++ b/clang/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}}