summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/temp_arg_nontype.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-11 16:52:38 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-11 16:52:38 +0000
commit040867836278659d02baa18e044bd996155ec3b5 (patch)
treeeb3fce1d09cef109b3bdeb776bf805fb744152c3 /test/SemaTemplate/temp_arg_nontype.cpp
parent8b2bc72651381722d6beefc9b9b2db1b07b60f40 (diff)
downloadclang-040867836278659d02baa18e044bd996155ec3b5.tar.gz
clang-040867836278659d02baa18e044bd996155ec3b5.tar.bz2
clang-040867836278659d02baa18e044bd996155ec3b5.tar.xz
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
Diffstat (limited to 'test/SemaTemplate/temp_arg_nontype.cpp')
-rw-r--r--test/SemaTemplate/temp_arg_nontype.cpp10
1 files changed, 10 insertions, 0 deletions
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<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;
+