[cfe-commits] r77452 - in /cfe/trunk: include/clang/AST/ExprObjC.h lib/Sema/SemaExpr.cpp

Steve Naroff snaroff at apple.com
Wed Jul 29 07:06:45 PDT 2009


Author: snaroff
Date: Wed Jul 29 09:06:03 2009
New Revision: 77452

URL: http://llvm.org/viewvc/llvm-project?rev=77452&view=rev
Log:
Incorporate feedback from Chris (on r76979).


Modified:
    cfe/trunk/include/clang/AST/ExprObjC.h
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/include/clang/AST/ExprObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprObjC.h?rev=77452&r1=77451&r2=77452&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ExprObjC.h (original)
+++ cfe/trunk/include/clang/AST/ExprObjC.h Wed Jul 29 09:06:03 2009
@@ -496,7 +496,8 @@
   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;

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=77452&r1=77451&r2=77452&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed Jul 29 09:06:03 2009
@@ -2341,7 +2341,7 @@
     }
     // 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 @@
   // 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()));
 





More information about the cfe-commits mailing list