summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/deduction.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-04-13 21:37:24 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-04-13 21:37:24 +0000
commit1389418e18407da990cc5c503eb78d1bc8532fc8 (patch)
treecd200dff8f7e3e8eec47769e84a53a642b68ea88 /clang/test/SemaTemplate/deduction.cpp
parentd0e9481c55e1edca268a240359d3acc4c2a212fa (diff)
downloadbcm5719-llvm-1389418e18407da990cc5c503eb78d1bc8532fc8.tar.gz
bcm5719-llvm-1389418e18407da990cc5c503eb78d1bc8532fc8.zip
PR32185: Revert r291512 and add a testcase for PR32185.
This reverts an attempt to check that types match when matching a dependently-typed non-type template parameter. (This comes up when matching the parameters of a template template parameter against the parameters of a template template argument.) The matching rules here are murky at best. Our behavior after this revert is definitely wrong for certain C++17 features (for 'auto' template parameter types within the parameter list of a template template argument in particular), but our behavior before this revert is wrong for some pre-existing testcases, so reverting to our prior behavior seems like our best option. llvm-svn: 300262
Diffstat (limited to 'clang/test/SemaTemplate/deduction.cpp')
-rw-r--r--clang/test/SemaTemplate/deduction.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/test/SemaTemplate/deduction.cpp b/clang/test/SemaTemplate/deduction.cpp
index 8ac65aacd5b..74eb5a6ee58 100644
--- a/clang/test/SemaTemplate/deduction.cpp
+++ b/clang/test/SemaTemplate/deduction.cpp
@@ -483,16 +483,15 @@ namespace check_extended_pack {
}
namespace dependent_template_template_param_non_type_param_type {
- template<int N> struct A { // expected-note 2{{candidate}}
+ template<int N> struct A {
template<typename V = int, V M = 12, V (*Y)[M], template<V (*v)[M]> class W>
- A(W<Y>); // expected-note {{[with V = int, M = 12, Y = &dependent_template_template_param_non_type_param_type::n]}}
+ A(W<Y>);
};
int n[12];
template<int (*)[12]> struct Q {};
Q<&n> qn;
- // FIXME: This should be accepted, but we somehow fail to deduce W.
- A<0> a(qn); // expected-error {{no matching constructor for initialization}}
+ A<0> a(qn);
}
namespace dependent_list_deduction {
OpenPOWER on IntegriCloud