When a nested-name-specifier refers into a current instantiation that has
dependent bases, construct a dependent nested-name-specifier rather
than complaining that the name could not be found within the current
instantiation itself. Fixes PR7725.

llvm-svn: 109582
diff --git a/clang/test/SemaTemplate/nested-name-spec-template.cpp b/clang/test/SemaTemplate/nested-name-spec-template.cpp
index 12ab486..9c72845 100644
--- a/clang/test/SemaTemplate/nested-name-spec-template.cpp
+++ b/clang/test/SemaTemplate/nested-name-spec-template.cpp
@@ -88,3 +88,14 @@
 
   has_xxx0<int>::type t; // expected-note{{instantiation of}}
 }
+
+namespace PR7725 {
+  template<class ignored> struct TypedefProvider;
+  template<typename T>
+  struct TemplateClass : public TypedefProvider<T>
+  {
+    void PrintSelf() {
+      TemplateClass::Test::PrintSelf();
+    }
+  };
+}