r202941 - [AST] A "Class<P>" type should not have '*' when printed out.

Argyrios Kyrtzidis kyrtzidis at apple.com
Wed Mar 5 11:19:25 PST 2014


On Mar 5, 2014, at 9:29 AM, Jordan Rose <jordan_rose at apple.com> wrote:

> 
> 
> On Mar 4, 2014, at 22:47 , Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> 
>> -  if (!T->isObjCIdType() && !T->isObjCQualifiedIdType()) {
>> +  if (!T->isObjCIdType() && !T->isObjCQualifiedIdType() &&
>> +      !T->isObjCClassType() && !T->isObjCQualifiedClassType() &&
>> +      !T->isObjCSelType()) {
> 
> SEL isn't an ObjCObjectPointer. (It's an opaque pointer type, but not to an object.)

There’s a check and logic for T->isObjCSelType() earlier in the function so I’m not sure if it’s dead code or not.

> 
> Is it worth adding test cases like this? (Not that I've ever seen code like this, but it is legal...)
> 
>> typedef NSObject MyObject;
>> typedef NSObject *MyObjectRef;
>> 
>> MyObject <NSObject> *foo;
>> MyObjectRef bar;
> 

Added test cases in r202995; for "MyObject <NSObject> *” it doesn’t preserve the typedef name so I added a FIXME.

Thanks for reviewing!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140305/73e38142/attachment.html>


More information about the cfe-commits mailing list