From: Douglas Gregor Date: Mon, 11 May 2009 16:52:38 +0000 (+0000) Subject: Add a test for canonicalization of template arguments X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=040867836278659d02baa18e044bd996155ec3b5;p=clang Add a test for canonicalization of template arguments git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71436 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp index 4faa72b8e3..fe18fe657c 100644 --- a/test/SemaTemplate/temp_arg_nontype.cpp +++ b/test/SemaTemplate/temp_arg_nontype.cpp @@ -112,3 +112,13 @@ Overflow<256> *overflow2; // expected-error{{non-type template argument value '2 template 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 struct FuncPtr0; +int func0(int, int); +extern FuncPtr0<&func0> *fp0; +template struct FuncPtr0; +extern FuncPtr0<&func0> *fp0; +int func0(int, int); +extern FuncPtr0<&func0> *fp0; +