diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-10-02 00:49:37 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-10-02 00:49:37 +0000 |
commit | 7d3c3efae493deb4defae81df6d4598eb996a15d (patch) | |
tree | 37f3567d9f226f49df09805290dc564949a2bf93 /clang/test | |
parent | 4bc1a9ecea0e67a923147aa599507ece6f45b62d (diff) | |
download | bcm5719-llvm-7d3c3efae493deb4defae81df6d4598eb996a15d.tar.gz bcm5719-llvm-7d3c3efae493deb4defae81df6d4598eb996a15d.zip |
PR24921: checking explicitly-specified template arguments when matching a
partial specialization can perform conversions on the argument. Be sure we
start again from the original argument when checking each possible template.
llvm-svn: 249114
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp b/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp index 5000927d894..548f7f8f34f 100644 --- a/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp +++ b/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp @@ -148,3 +148,10 @@ namespace DeclMatch { template<typename T, T> int f() { return X<T>::n; } int k = f<int, 0>(); // ok, friend } + +namespace PR24921 { + enum E { e }; + template<E> void f(); + template<int> void f(int); + template<> void f<e>() {} +} |