Push nested-name-specifier source location information into
CXXDependentScopeMemberExpr, and clean up instantiation of
nested-name-specifiers with dependent template specialization types in
the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126663 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/nested-name-spec-locations.cpp b/test/SemaCXX/nested-name-spec-locations.cpp
index 25914df..344826d 100644
--- a/test/SemaCXX/nested-name-spec-locations.cpp
+++ b/test/SemaCXX/nested-name-spec-locations.cpp
@@ -65,6 +65,12 @@
 template<typename T>
 struct DependentScopedDeclRefExpr {
   void f() {
-    outer_alias::inner::X0<T>::value = 17;
+    outer_alias::inner::X0<typename add_reference<T>::type 
+      * // expected-error{{as a pointer to a reference of type}}
+      >::value = 17;
   }
 };
+
+void DependentScopedDeclRefExprCheck(DependentScopedDeclRefExpr<int> t) {
+  t.f(); // expected-note{{in instantiation of member function}}
+}