<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 18, 2015 at 5:20 PM, 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"><br><div><span class=""><blockquote type="cite"><div>On Feb 18, 2015, at 5:09 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:</div><br><div><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></div></blockquote><div><br></div></span>Okay.</div><div><span class=""><br><blockquote type="cite"><div><div dir="ltr"><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" target="_blank">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><br></div></span><div>Yeah it’s probably better to not have the user recompile just to get the second error.</div><span class=""><br><blockquote type="cite"><div><div dir="ltr"><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></blockquote><div><br></div></span><div>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><br></div><div>I agree that's what we should be doing. My concern is what happens if you have:</div><div><br></div><div>  template<typename T> X<T>::Y<T>::Z<T> f();</div><div><br></div><div>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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>Thanks for the review,</div><div><br></div><div>Ben</div><span class=""><br><blockquote type="cite"><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><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>
</div></blockquote></span></div><br></div></blockquote></div><br></div></div>