When perform exact-qualifier-match template argument deduction,
properly account for the possibility that certain opaque types
might be more qualified than they appear.  Fixes PR7708.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112390 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp
index c4c6688..9400a0a 100644
--- a/test/SemaTemplate/deduction.cpp
+++ b/test/SemaTemplate/deduction.cpp
@@ -121,3 +121,16 @@
     foo(a);
   }
 }
+
+// PR7708
+namespace test2 {
+  template<typename T> struct Const { typedef void const type; };
+
+  template<typename T> void f(T, typename Const<T>::type*);
+  template<typename T> void f(T, void const *);
+
+  void test() {
+    void *p = 0;
+    f(0, p);
+  }
+}