Don't assert when attempting to take the address of an overloaded
function fails due to ambiguities in partial ordering of function
templates. Fixes PR8033.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113725 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/addr-of-overloaded-function.cpp b/test/SemaCXX/addr-of-overloaded-function.cpp
index b581b8a..46bdf8e 100644
--- a/test/SemaCXX/addr-of-overloaded-function.cpp
+++ b/test/SemaCXX/addr-of-overloaded-function.cpp
@@ -96,3 +96,11 @@
     static bool g(int, char);
   };
 }
+
+namespace PR8033 {
+  template <typename T1, typename T2> int f(T1 *, const T2 *); // expected-note{{candidate function [with T1 = const int, T2 = int]}}
+  template <typename T1, typename T2> int f(const T1 *, T2 *); // expected-note{{candidate function [with T1 = int, T2 = const int]}}
+  int (*p)(const int *, const int *) = f; // expected-error{{address of overloaded function 'f' is ambiguous}} \
+  // expected-error{{cannot initialize a variable of type}}
+
+}