]> granicus.if.org Git - clang/commitdiff
Add a test for canonicalization of template arguments
authorDouglas Gregor <dgregor@apple.com>
Mon, 11 May 2009 16:52:38 +0000 (16:52 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 11 May 2009 16:52:38 +0000 (16:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71436 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/temp_arg_nontype.cpp

index 4faa72b8e3d8048bb2faec58761c0c7b05a0c493..fe18fe657c160f3a96ad67c1eca3b81f556bbec9 100644 (file)
@@ -112,3 +112,13 @@ Overflow<256> *overflow2; // expected-error{{non-type template argument value '2
 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;
+