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

Jordan Rose jordan_rose at apple.com
Wed Mar 5 14:14:19 PST 2014


On Mar 5, 2014, at 11:19 , Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:

> 
> 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.

Yes, that's definitely dead. In fact, now I wonder if we're printing SEL correctly.

% echo 'SEL foo;' | clang -Xclang -ast-print -x objective-c -fsyntax-only -
typedef SEL *SEL;
typedef id id;
typedef Class *Class;
SEL foo;

Yes, looks like we're okay. Slightly funny-looking, but correct.
Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140305/f5afbc56/attachment.html>


More information about the cfe-commits mailing list