<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 18, 2015, at 7:45 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" class="">richard@metafoo.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 18, 2015 at 5:20 PM, Ben Langmuir <span dir="ltr" class=""><<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Feb 18, 2015, at 5:09 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank" class="">richard@metafoo.co.uk</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class="">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></div></blockquote><div class=""><br class=""></div></span>Okay.</div><div class=""><span class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">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" target="_blank" class="">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></div></blockquote><div class=""><br class=""></div></span><div class="">Yeah it’s probably better to not have the user recompile just to get the second error.</div><span class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">More generally, should we rebuild the whole nested name specifier as a dependent specifier, rather than just the last component?</div></div></div></blockquote><div class=""><br class=""></div></span><div class="">My goal was to match what was produced if you put in the typename and template keywords.  I’m willing to admit I might have got it wrong - it’s been a while since I traced through it.  I’ll take a look.</div></div></div></blockquote><div class=""><br class=""></div><div class="">I agree that's what we should be doing. My concern is what happens if you have:</div><div class=""><br class=""></div><div class="">  template<typename T> X<T>::Y<T>::Z<T> f();</div><div class=""><br class=""></div><div class="">It looks like you'll only rebuild the X<T>::Y<T>::Z to be a dependent template name, and the X<T>::Y will be treated as a non-dependent name as a member of the primary X<T> template.</div></div></div></div></div></blockquote><div><br class=""></div><div>Okay, makes sense.  I should also add a test case like that.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class="">Thanks for the review,</div><div class=""><br class=""></div><div class="">Ben</div><span class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jan 26, 2015 at 9:08 AM, Ben Langmuir <span dir="ltr" class=""><<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">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" class="">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 class=""><br class=""></div><div class="">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=""><font color="#888888" class=""><div class=""><br class=""></div><div class="">Ben</div><div class=""><br class=""></div><div class=""></div></font></span></div><br class=""><div style="word-wrap:break-word" class=""><div class=""></div></div><br class=""></blockquote></div><br class=""></div>
</div></blockquote></span></div><br class=""></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>