diff options
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index eff259d8fa..a19a1d16d0 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -53,7 +53,7 @@ Sema::ExprResult Sema::ParseObjCStringLiteral(SourceLocation *AtLocs, // Initialize the constant string interface lazily. This assumes // the NSConstantString interface is seen in this translation unit. IdentifierInfo *NSIdent = &Context.Idents.get("NSConstantString"); - Decl *IFace = LookupDecl(NSIdent, Decl::IDNS_Ordinary, TUScope); + Decl *IFace = LookupDeclInScope(NSIdent, Decl::IDNS_Ordinary, TUScope); ObjCInterfaceDecl *strIFace = dyn_cast_or_null<ObjCInterfaceDecl>(IFace); if (strIFace) Context.setObjCConstantStringInterface(strIFace); @@ -210,7 +210,7 @@ Sema::ExprResult Sema::ActOnClassMessage( } else { // 'super' has been used outside a method context. If a variable named // 'super' has been declared, redirect. If not, produce a diagnostic. - Decl *SuperDecl = LookupDecl(receiverName, Decl::IDNS_Ordinary, S); + Decl *SuperDecl = LookupDeclInScope(receiverName, Decl::IDNS_Ordinary, S); ValueDecl *VD = dyn_cast_or_null<ValueDecl>(SuperDecl); if (VD) { ExprResult ReceiverExpr = new DeclRefExpr(VD, VD->getType(), @@ -235,7 +235,7 @@ Sema::ExprResult Sema::ActOnClassMessage( // // If necessary, the following lookup could move to getObjCInterfaceDecl(). if (!ClassDecl) { - Decl *IDecl = LookupDecl(receiverName, Decl::IDNS_Ordinary, 0); + Decl *IDecl = LookupDeclInScope(receiverName, Decl::IDNS_Ordinary, 0); if (TypedefDecl *OCTD = dyn_cast_or_null<TypedefDecl>(IDecl)) { const ObjCInterfaceType *OCIT; OCIT = OCTD->getUnderlyingType()->getAsObjCInterfaceType(); |