aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/overload-candidates.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-08 20:18:54 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-08 20:18:54 +0000
commitff5adac099e9be58e16cf118ca3eb3f3e570c616 (patch)
tree6395371e1014a456f4bd032c2867d9f8e02f0929 /test/SemaTemplate/overload-candidates.cpp
parentec20f46740a59758b12c22108002395bcf5b6f9b (diff)
Record template argument deduction failures for member function
templates and conversion function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/overload-candidates.cpp')
-rw-r--r--test/SemaTemplate/overload-candidates.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaTemplate/overload-candidates.cpp b/test/SemaTemplate/overload-candidates.cpp
index 937d633e68..8762cc8063 100644
--- a/test/SemaTemplate/overload-candidates.cpp
+++ b/test/SemaTemplate/overload-candidates.cpp
@@ -29,3 +29,12 @@ template<typename T>
void test_get_type(int *ptr) {
(void)get_type(ptr); // expected-error{{no matching function for call to 'get_type'}}
}
+
+struct X {
+ template<typename T>
+ const T& min(const T&, const T&); // expected-note{{candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long')}}
+};
+
+void test_X_min(X x) {
+ (void)x.min(1, 2l); // expected-error{{no matching member function for call to 'min'}}
+}