forked from OSchip/llvm-project
Fix <rdar://problem/6614945> method not found.
This was a fairly recent regression. llvm-svn: 65547
This commit is contained in:
parent
58ac0b4bac
commit
42ab0dd1ee
|
@ -395,10 +395,10 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
|
|||
}
|
||||
if (Method && DiagnoseUseOfDecl(Method, receiverLoc))
|
||||
return true;
|
||||
} else {
|
||||
// We're not in a method context, look for any factory method named 'Sel'.
|
||||
Method = FactoryMethodPool[Sel].Method;
|
||||
}
|
||||
// Look for any factory method named 'Sel'.
|
||||
if (!Method)
|
||||
Method = FactoryMethodPool[Sel].Method;
|
||||
if (!Method)
|
||||
Method = LookupInstanceMethodInGlobalPool(
|
||||
Sel, SourceRange(lbrac,rbrac));
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
typedef signed char BOOL;
|
||||
|
||||
@protocol NSObject
|
||||
+ alloc;
|
||||
- init;
|
||||
- (BOOL) isEqual:(id) object;
|
||||
- (Class)class;
|
||||
@end
|
||||
|
||||
@interface NSObject < NSObject > {} @end
|
||||
|
@ -38,3 +41,22 @@ extern NSString *const NSWillBecomeMultiThreadedNotification;
|
|||
return[[self sharedInstance] run];
|
||||
}
|
||||
@end
|
||||
|
||||
@interface XX : NSObject
|
||||
|
||||
+ classMethod;
|
||||
|
||||
@end
|
||||
|
||||
@interface YY : NSObject
|
||||
- whatever;
|
||||
@end
|
||||
|
||||
@implementation YY
|
||||
|
||||
- whatever {
|
||||
id obj = [[XX alloc] init];
|
||||
[[obj class] classMethod];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue