]> granicus.if.org Git - clang/commitdiff
Incorporate feedback from Chris (on r76979).
authorSteve Naroff <snaroff@apple.com>
Wed, 29 Jul 2009 14:06:03 +0000 (14:06 +0000)
committerSteve Naroff <snaroff@apple.com>
Wed, 29 Jul 2009 14:06:03 +0000 (14:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77452 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ExprObjC.h
lib/Sema/SemaExpr.cpp

index d610b3c01e3beacfeab64369b89996ceeaf0bff7..16c5d6e0ea22f818298bcf541c4bd9d86dc591de 100644 (file)
@@ -496,7 +496,8 @@ public:
   virtual child_iterator child_end();
 };
 
-/// ObjCIsaExpr - Represent X->isa and X.isa (similiar in spirit to MemberExpr).
+/// ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
+/// (similiar in spirit to MemberExpr).
 class ObjCIsaExpr : public Expr {
   /// Base - the expression for the base object pointer.
   Stmt *Base;
index ba9d51dfb56e20a8a4002e39726fc9f3d41f3415..9114c0b5c199355ce39b44f185550d3616a3729c 100644 (file)
@@ -2341,7 +2341,7 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
     }
     // We have an 'id' type. Rather than fall through, we check if this
     // is a reference to 'isa'.
-    if (&Member == &Context.Idents.get("isa"))
+    if (Member.isStr("isa"))
       return Owned(new (Context) ObjCIsaExpr(BaseExpr, true, MemberLoc,
                                              Context.getObjCIdType()));
   }
@@ -2478,7 +2478,7 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
   // Handle the following exceptional case (*Obj).isa.
   if (OpKind == tok::period && 
       BaseType->isSpecificBuiltinType(BuiltinType::ObjCId) &&
-      &Member == &Context.Idents.get("isa"))
+      Member.isStr("isa"))
     return Owned(new (Context) ObjCIsaExpr(BaseExpr, false, MemberLoc,
                                            Context.getObjCIdType()));