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:
Steve Naroff 2009-03-11 15:15:01 +00:00
Родитель 1ca6694b5b
Коммит f178728e8c
2 изменённых файлов: 36 добавлений и 10 удалений

Просмотреть файл

@ -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