aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-21 04:44:44 +0000
committerChris Lattner <sabre@nondot.org>2008-07-21 04:44:44 +0000
commit123a11f2fd40fc56333ea67b77d4476b0d9339c0 (patch)
treedc4d95997c666281b8a143d67512c616983ef3ac
parent1f719747b214866535e63b0fe2f5f21da67a5387 (diff)
use the simplified form of lookupInstanceVariable for callers who
don't care which class actually defines it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53825 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExpr.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index b81e090f7f..3c5a467edc 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -91,8 +91,7 @@ Sema::ExprResult Sema::ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
// 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 @@ ActOnMemberReferenceExpr(ExprTy *Base, SourceLocation OpLoc,
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.