r290843 - Add testcase for the regression introduced in r290808.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 2 15:00:32 PST 2017


Author: rsmith
Date: Mon Jan  2 17:00:32 2017
New Revision: 290843

URL: http://llvm.org/viewvc/llvm-project?rev=290843&view=rev
Log:
Add testcase for the regression introduced in r290808.

Modified:
    cfe/trunk/test/SemaTemplate/deduction.cpp

Modified: cfe/trunk/test/SemaTemplate/deduction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/deduction.cpp?rev=290843&r1=290842&r2=290843&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/deduction.cpp (original)
+++ cfe/trunk/test/SemaTemplate/deduction.cpp Mon Jan  2 17:00:32 2017
@@ -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
+  }
+}




More information about the cfe-commits mailing list