Patch to mangle __uuidof expressions under -fms-extensions

jahanian fjahanian at apple.com
Wed Sep 24 09:39:32 PDT 2014


On Sep 23, 2014, at 4:35 PM, John McCall <rjmccall at apple.com> wrote:

>>> 
>>> For sizeof, the mangling prefix is either “st” or “sz”, respectively.
>>> So let’s use these manglings:
>>> 
>>>   u8__uuidoft <type>          # __uuidof (a type)
>>>   u8__uuidofz <expression>    # __uuidof (an expression)
>> 
>> Hi John,
>> Please review the new patch.
> 
> Looks good.  Please also test the dependent cases; this would look something like:
> 
> template <class T> void test_uuidofType(void(*arg)[sizeof(__uuidof(T))] = 0) {}
> template <class T> void test_uuidofExpr(void(*arg)[sizeof(__uuidof(T::member))] = 0) {}
> struct HasMember { typedef TestStruct member; };
> void test() {
>   test_uuidofType<TestStruct>();
>   test_uuidofExpr<HasMember>();
> }
> 

Thanks. In r218384.
- Fariborz

> John.

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


More information about the cfe-commits mailing list