Testcase: template <typename,typename> struct base { template <typename> struct derived; }; template <typename T, typename U, typename V> base<T, U>::derived<V> foo(); We should print an error about the missing typename and template keywords.
This can also cause assertion failures or generate invalid IR: template<typename T> struct A { template<typename U> struct B {}; }; struct C {}; template<typename T> A<T>::B<T> begin(const T &); void test() { auto __begin = begin(5); // asserts because we didn't deduce the type of __begin for (auto &&x : C()); // without assertions, will produce invalid LLVM IR }
This is also tracked as rdar://problem/19438432. Ben proposed a patch: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150126/122055.html