diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-04-21 20:22:17 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-04-21 20:22:17 +0000 |
commit | 29cdbc63193d2c8cbf7fc370237fb5d306a07047 (patch) | |
tree | b641b6184098870e79cadb78886fee3d2e2ae1ed /clang/lib/Sema/SemaExprObjC.cpp | |
parent | b0b7b18e8cb64fcb9f16bfee9b4cad0025d01ae4 (diff) | |
download | bcm5719-llvm-29cdbc63193d2c8cbf7fc370237fb5d306a07047.tar.gz bcm5719-llvm-29cdbc63193d2c8cbf7fc370237fb5d306a07047.zip |
Objective-C. Patch to allow use of dot syntax on class
objects to fund root class's instance methods.
// rdar://16650575
llvm-svn: 206781
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index 5bffdd1573a..8dd319c98bd 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -1762,10 +1762,7 @@ ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, // If this reference is in an @implementation, check for 'private' methods. if (!Getter) - if (ObjCMethodDecl *CurMeth = getCurMethodDecl()) - if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface()) - if (ObjCImplementationDecl *ImpDecl = ClassDecl->getImplementation()) - Getter = ImpDecl->getClassMethod(Sel); + Getter = IFace->lookupPrivateClassMethod(Sel); if (Getter) { // FIXME: refactor/share with ActOnMemberReference(). @@ -1784,10 +1781,7 @@ ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, if (!Setter) { // If this reference is in an @implementation, also check for 'private' // methods. - if (ObjCMethodDecl *CurMeth = getCurMethodDecl()) - if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface()) - if (ObjCImplementationDecl *ImpDecl = ClassDecl->getImplementation()) - Setter = ImpDecl->getClassMethod(SetterSel); + Setter = IFace->lookupPrivateClassMethod(SetterSel); } // Look through local category implementations associated with the class. if (!Setter) |