summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/deduction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaTemplate/deduction.cpp')
-rw-r--r--clang/test/SemaTemplate/deduction.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/deduction.cpp b/clang/test/SemaTemplate/deduction.cpp
index 419464447d5..16e01a93463 100644
--- a/clang/test/SemaTemplate/deduction.cpp
+++ b/clang/test/SemaTemplate/deduction.cpp
@@ -385,10 +385,21 @@ namespace deduction_after_explicit_pack {
void q() { p(X<int>(0), 0); } // expected-error {{no match}}
struct A {
- template <typename T> void f(T, void *, int = 0); // expected-note {{no known conversion from 'double' to 'void *' for 2nd argument}}
- void f(); // expected-note {{requires 0}}
+ template <typename T> void f(T, void *, int = 0); // expected-note 2{{no known conversion from 'double' to 'void *' for 2nd argument}}
+ void f(); // expected-note 2{{requires 0}}
+
+ template <typename T> static void g(T, void *, int = 0); // expected-note 2{{no known conversion from 'double' to 'void *' for 2nd argument}}
+ void g(); // expected-note 2{{requires 0}}
+
+ void h() {
+ f(1.0, 2.0); // expected-error {{no match}}
+ g(1.0, 2.0); // expected-error {{no match}}
+ }
};
- void f(A a) { a.f(1.0, 2.0); } // expected-error {{no match}}
+ void f(A a) {
+ a.f(1.0, 2.0); // expected-error {{no match}}
+ a.g(1.0, 2.0); // expected-error {{no match}}
+ }
}
namespace overload_vs_pack {
OpenPOWER on IntegriCloud