[cfe-commits] r53825 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Chris Lattner sabre at nondot.org
Sun Jul 20 21:44:44 PDT 2008


Author: lattner
Date: Sun Jul 20 23:44:44 2008
New Revision: 53825

URL: http://llvm.org/viewvc/llvm-project?rev=53825&view=rev
Log:
use the simplified form of lookupInstanceVariable for callers who
don't care which class actually defines it.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

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

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun Jul 20 23:44:44 2008
@@ -91,8 +91,7 @@
     // name, if the lookup suceeds, we replace it our current decl.
     if (SD == 0 || SD->isDefinedOutsideFunctionOrMethod()) {
       ObjCInterfaceDecl *IFace = getCurMethodDecl()->getClassInterface();
-      ObjCInterfaceDecl *DeclClass;
-      if (ObjCIvarDecl *IV = IFace->lookupInstanceVariable(&II, DeclClass)) {
+      if (ObjCIvarDecl *IV = IFace->lookupInstanceVariable(&II)) {
         // FIXME: This should use a new expr for a direct reference, don't turn
         // this into Self->ivar, just return a BareIVarExpr or something.
         IdentifierInfo &II = Context.Idents.get("self");
@@ -637,8 +636,7 @@
       IFace = dyn_cast<ObjCInterfaceType>(CanonType)->getDecl();
     else
       IFace = dyn_cast<ObjCQualifiedInterfaceType>(CanonType)->getDecl();
-    ObjCInterfaceDecl *clsDeclared;
-    if (ObjCIvarDecl *IV = IFace->lookupInstanceVariable(&Member, clsDeclared))
+    if (ObjCIvarDecl *IV = IFace->lookupInstanceVariable(&Member))
       return new ObjCIvarRefExpr(IV, IV->getType(), MemberLoc, BaseExpr, 
                                  OpKind==tok::arrow);
     // Check for properties.





More information about the cfe-commits mailing list