Fix crash on qualified template name instantiation if the template name has no
template argument list.

llvm-svn: 330881
diff --git a/clang/test/SemaTemplate/dependent-names.cpp b/clang/test/SemaTemplate/dependent-names.cpp
index d5c9d66..070c7e4 100644
--- a/clang/test/SemaTemplate/dependent-names.cpp
+++ b/clang/test/SemaTemplate/dependent-names.cpp
@@ -419,3 +419,11 @@
   template <class U> struct X;
 };
 template <typename T> int CT2<int>::X<>; // expected-error {{template parameter list matching the non-templated nested type 'CT2<int>' should be empty}}
+
+namespace DependentTemplateIdWithNoArgs {
+  template<typename T> void f() { T::template f(); }
+  struct X {
+    template<int = 0> static void f();
+  };
+  void g() { f<X>(); }
+}