When performing template name lookup for a dependent member access
expression such as the "foo" in "this->blah.foo<1, 2>", and we can't
look into the type of "this->blah" (e.g., because it is dependent),
look into the local scope of a template of the same name. Fixes
<rdar://problem/8198511>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108531 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/member-template-access-expr.cpp b/test/SemaTemplate/member-template-access-expr.cpp
index ea17cdb..dbd27c4 100644
--- a/test/SemaTemplate/member-template-access-expr.cpp
+++ b/test/SemaTemplate/member-template-access-expr.cpp
@@ -123,3 +123,22 @@
     };
   };
 }
+
+namespace rdar8198511 {
+  template<int, typename U>
+  struct Base { 
+    void f();
+  };
+
+  template<typename T>
+  struct X0 : Base<1, T> { };
+
+  template<typename T>
+  struct X1 {
+    X0<int> x0;
+
+    void f() {
+      this->x0.Base<1, int>::f();
+    }
+  };
+}