summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/deduction.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-01-02 23:00:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-01-02 23:00:32 +0000
commitdadcc1827618e2993576e16389e5d7a71db6aa32 (patch)
treee0196b51863c980be84d5f71eff3ce9d28bd3e36 /clang/test/SemaTemplate/deduction.cpp
parent5cad6856a30a20885a4e6a8734cc9ccb0bb9f05c (diff)
downloadbcm5719-llvm-dadcc1827618e2993576e16389e5d7a71db6aa32.tar.gz
bcm5719-llvm-dadcc1827618e2993576e16389e5d7a71db6aa32.zip
Add testcase for the regression introduced in r290808.
llvm-svn: 290843
Diffstat (limited to 'clang/test/SemaTemplate/deduction.cpp')
-rw-r--r--clang/test/SemaTemplate/deduction.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/deduction.cpp b/clang/test/SemaTemplate/deduction.cpp
index 9471bac91c3..69a3817f735 100644
--- a/clang/test/SemaTemplate/deduction.cpp
+++ b/clang/test/SemaTemplate/deduction.cpp
@@ -348,3 +348,17 @@ namespace deduction_substitution_failure {
template<typename T> int B<T, typename Fail<T>::error> {}; // expected-note {{instantiation of}}
int bi = B<char, char>; // expected-note {{during template argument deduction for variable template partial specialization 'B<T, typename Fail<T>::error>' [with T = char]}}
}
+
+namespace deduction_after_explicit_pack {
+ template<typename ...T, typename U> int *f(T ...t, int &r, U *u) { // expected-note {{couldn't infer template argument 'U'}}
+ return u;
+ }
+ template<typename U, typename ...T> int *g(T ...t, int &r, U *u) {
+ return u;
+ }
+ void h(float a, double b, int c) {
+ // FIXME: Under DR1388, this appears to be valid.
+ f<float&, double&>(a, b, c, &c); // expected-error {{no matching}}
+ g<int, float&, double&>(a, b, c, &c); // ok
+ }
+}
OpenPOWER on IntegriCloud