<div dir="ltr"><div>Makes sense to me. I'm not too unhappy about the class.qual p2 case; it's not ideal, but the new diagnostic explains one way to fix the problem, which is in some sense an improvement, and it only arises if the user makes several errors all at once. A FIXME in the test would be nice, though.</div><div><br></div><div>Should we also diagnose the missing 'template' keyword? (I'd note that <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1710">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1710</a> removes the need for that keyword here, but isn't fully baked yet).</div><div><br></div><div>More generally, should we rebuild the whole nested name specifier as a dependent specifier, rather than just the last component?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 9:08 AM, Ben Langmuir <span dir="ltr"><<a href="mailto:blangmuir@apple.com" target="_blank">blangmuir@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">This patch diagnoses a missing ‘typename’ keyword on nested template types like A<T>::B<U>, to fix <a href="http://llvm.org/pr16909" target="_blank">llvm.org/pr16909</a>. In addition to fixing an accepts-invalid, in C++11 such types would cause assertion failures and/or invalid LLVM IR when used with ‘auto’.<div><br></div><div>I’m not 100% sure if the changes to test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp are desirable, or if we should suppress the missing ‘typename’ diagnostic when we’re already recovering on X<T>::X<T>.  I’m open to suggestions :-)</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Ben</div><div><br></div><div></div></font></span></div><br><div style="word-wrap:break-word"><div></div></div><br></blockquote></div><br></div>