[cfe-commits] r86570 - /cfe/trunk/test/SemaTemplate/instantiate-member-template.cpp

Douglas Gregor dgregor at apple.com
Mon Nov 9 10:29:00 PST 2009


Author: dgregor
Date: Mon Nov  9 12:29:00 2009
New Revision: 86570

URL: http://llvm.org/viewvc/llvm-project?rev=86570&view=rev
Log:
Slightly more testing for instantiation of non-type template parameters in nested templates, for my own sanity's sake

Modified:
    cfe/trunk/test/SemaTemplate/instantiate-member-template.cpp

Modified: cfe/trunk/test/SemaTemplate/instantiate-member-template.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-member-template.cpp?rev=86570&r1=86569&r2=86570&view=diff

==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-member-template.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-member-template.cpp Mon Nov  9 12:29:00 2009
@@ -103,3 +103,16 @@
   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}}





More information about the cfe-commits mailing list