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

Bataev, Alexey a.bataev at gmx.com
Wed Feb 11 19:34:52 PST 2015


Hi Ben,
I don't think your patch is compatible with MSVC. MSVC accepts this code 
and clang should accept it and generate proper LLVM IR. Actually, you 
can run into similar code in MSVC system headers. That's the main problem

Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team
Intel Corp.

11.02.2015 20:37, Ben Langmuir пишет:
> Ping
>
>> On Jan 26, 2015, at 9:08 AM, Ben Langmuir <blangmuir at apple.com 
>> <mailto:blangmuir at apple.com>> wrote:
>>
>> 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
>>
>> <pr16909.patch>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150212/faa2abab/attachment.html>


More information about the cfe-commits mailing list