Author: dgregor
Date: Mon May 11 11:52:38 2009
New Revision: 71436

URL: http://llvm.org/viewvc/llvm-project?rev=71436&view=rev
Log:
Add a test for canonicalization of template arguments

Modified:
    cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp

Modified: cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp?rev=71436&r1=71435&r2=71436&view=diff

==============================================================================
--- cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp (original)
+++ cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp Mon May 11 11:52:38 2009
@@ -112,3 +112,13 @@
 template<unsigned> struct Signedness; // expected-note{{template parameter is 
declared here}}
 Signedness<10> *signedness1; // okay
 Signedness<-10> *signedness2; // expected-error{{non-type template argument 
provides negative value '-10' for unsigned template parameter of type 'unsigned 
int'}}
+
+// Check canonicalization of template arguments.
+template<int (*)(int, int)> struct FuncPtr0;
+int func0(int, int);
+extern FuncPtr0<&func0> *fp0;
+template<int (*)(int, int)> struct FuncPtr0;
+extern FuncPtr0<&func0> *fp0;
+int func0(int, int);
+extern FuncPtr0<&func0> *fp0;
+


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to