зеркало из 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 this reference is in an @implementation, check for 'private' methods.
|
||||||
if (!Getter)
|
if (!Getter)
|
||||||
if (ObjCMethodDecl *CurMeth = getCurMethodDecl())
|
if (ObjCImplementationDecl *ImpDecl =
|
||||||
if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface())
|
ObjCImplementations[IFace->getIdentifier()])
|
||||||
if (ObjCImplementationDecl *ImpDecl =
|
Getter = ImpDecl->getInstanceMethod(Sel);
|
||||||
ObjCImplementations[ClassDecl->getIdentifier()])
|
|
||||||
Getter = ImpDecl->getInstanceMethod(Sel);
|
|
||||||
|
|
||||||
// Look through local category implementations associated with the class.
|
// Look through local category implementations associated with the class.
|
||||||
if (!Getter) {
|
if (!Getter) {
|
||||||
|
@ -1893,11 +1891,9 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
|
||||||
if (!Setter) {
|
if (!Setter) {
|
||||||
// If this reference is in an @implementation, also check for 'private'
|
// If this reference is in an @implementation, also check for 'private'
|
||||||
// methods.
|
// methods.
|
||||||
if (ObjCMethodDecl *CurMeth = getCurMethodDecl())
|
if (ObjCImplementationDecl *ImpDecl =
|
||||||
if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface())
|
ObjCImplementations[IFace->getIdentifier()])
|
||||||
if (ObjCImplementationDecl *ImpDecl =
|
Setter = ImpDecl->getInstanceMethod(SetterSel);
|
||||||
ObjCImplementations[ClassDecl->getIdentifier()])
|
|
||||||
Setter = ImpDecl->getInstanceMethod(SetterSel);
|
|
||||||
}
|
}
|
||||||
// Look through local category implementations associated with the class.
|
// Look through local category implementations associated with the class.
|
||||||
if (!Setter) {
|
if (!Setter) {
|
||||||
|
|
|
@ -62,3 +62,33 @@ NSSize minimumSize;
|
||||||
}
|
}
|
||||||
@end
|
@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
|
||||||
|
|
Загрузка…
Ссылка в новой задаче