зеркало из https://github.com/microsoft/clang-1.git
Fix <rdar://problem/6655054> clang issues bogus error on property usage in a dot-syntax.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
1ca6694b5b
Коммит
f178728e8c
|
@ -1866,11 +1866,9 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
|
|||
|
||||
// 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 =
|
||||
ObjCImplementations[ClassDecl->getIdentifier()])
|
||||
Getter = ImpDecl->getInstanceMethod(Sel);
|
||||
if (ObjCImplementationDecl *ImpDecl =
|
||||
ObjCImplementations[IFace->getIdentifier()])
|
||||
Getter = ImpDecl->getInstanceMethod(Sel);
|
||||
|
||||
// Look through local category implementations associated with the class.
|
||||
if (!Getter) {
|
||||
|
@ -1893,11 +1891,9 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
|
|||
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 =
|
||||
ObjCImplementations[ClassDecl->getIdentifier()])
|
||||
Setter = ImpDecl->getInstanceMethod(SetterSel);
|
||||
if (ObjCImplementationDecl *ImpDecl =
|
||||
ObjCImplementations[IFace->getIdentifier()])
|
||||
Setter = ImpDecl->getInstanceMethod(SetterSel);
|
||||
}
|
||||
// Look through local category implementations associated with the class.
|
||||
if (!Setter) {
|
||||
|
|
|
@ -62,3 +62,33 @@ NSSize minimumSize;
|
|||
}
|
||||
@end
|
||||
|
||||
@class NSImage;
|
||||
|
||||
@interface XCImageArchiveEntry : NSObject
|
||||
{
|
||||
NSImage *_cachedImage;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation XCImageArchiveEntry
|
||||
|
||||
- (NSImage *)image
|
||||
{
|
||||
return _cachedImage;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface XCImageArchive : NSObject
|
||||
@end
|
||||
|
||||
@implementation XCImageArchive
|
||||
|
||||
- (NSImage *)imageNamed:(NSString *)name
|
||||
{
|
||||
XCImageArchiveEntry * entry;
|
||||
return entry ? entry.image : ((void *)0);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Загрузка…
Ссылка в новой задаче