Replace one hack with a different hack:  strip out the ObjectType
parameters to the Transform*Type functions and instead call out
the specific cases where an object type and the unqualified lookup
results are important.  Fixes an assert and failed compile on
a testcase from PR7248.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118887 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-member-expr.cpp b/test/SemaTemplate/instantiate-member-expr.cpp
index 188705c..04bfada 100644
--- a/test/SemaTemplate/instantiate-member-expr.cpp
+++ b/test/SemaTemplate/instantiate-member-expr.cpp
@@ -49,3 +49,20 @@
   };
   template struct O::B<int>; // expected-note {{in instantiation}}
 }
+
+// PR7248
+namespace test2 {
+  template <class T> struct A {
+    void foo() {
+      T::bar(); // expected-error {{type 'int' cannot}}
+    }
+  };
+
+  template <class T> class B {
+    void foo(A<T> a) {
+      a.test2::template A<T>::foo(); // expected-note {{in instantiation}}
+    }
+  };
+
+  template class B<int>;
+}