Test function template partial ordering when resolving the address of
an overloaded function (template).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81804 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/addr-of-overloaded-function.cpp b/test/SemaCXX/addr-of-overloaded-function.cpp
index 9c9f0e1..e49b477 100644
--- a/test/SemaCXX/addr-of-overloaded-function.cpp
+++ b/test/SemaCXX/addr-of-overloaded-function.cpp
@@ -23,7 +23,22 @@
int g2(int);
int g2(double);
+template<typename T> T g3(T);
+int g3(int);
+int g3(char);
+
void g_test() {
g(g1);
g(g2); // expected-error{{call to 'g' is ambiguous; candidates are:}}
+ g(g3);
+}
+
+template<typename T> T h1(T);
+template<typename R, typename A1> R h1(A1);
+int h2(char);
+
+void h(int (*fp)(int));
+
+void h_test() {
+ h(h1);
}