[PATCH] PR16909: Diagnose missing 'typename' on dependent template

Ben Langmuir blangmuir at apple.com
Mon Jan 26 09:08:12 PST 2015


This patch diagnoses a missing ‘typename’ keyword on nested template types like A<T>::B<U>, to fix llvm.org/pr16909 <http://llvm.org/pr16909>. 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’.

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 :-)

Ben

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150126/d079531b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr16909.patch
Type: application/octet-stream
Size: 5698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150126/d079531b/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150126/d079531b/attachment-0001.html>


More information about the cfe-commits mailing list