]> granicus.if.org Git - clang/commitdiff
Slightly more testing for instantiation of non-type template parameters in nested...
authorDouglas Gregor <dgregor@apple.com>
Mon, 9 Nov 2009 18:29:00 +0000 (18:29 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 9 Nov 2009 18:29:00 +0000 (18:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86570 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/instantiate-member-template.cpp

index 36f3b6fd490d396b82311c9b83d4590e4c853849..95556bcc221b628630d3879644e19493b3374328 100644 (file)
@@ -103,3 +103,16 @@ void test_X1(int *ip, int i, double *dp) {
   X1<int*>::Inner4<int>::value = 17;
   i = X1<int*>::Inner4<int&>::value; // expected-note{{instantiation}}
 }
+
+
+template<typename T>
+struct X2 {
+  template<T *Ptr> // expected-error{{pointer to a reference}}
+  struct Inner;
+  
+  template<T Value> // expected-error{{cannot have type 'float'}}
+  struct Inner2;
+};
+
+X2<int&> x2a; // expected-note{{instantiation}}
+X2<float> x2b; // expected-note{{instantiation}}