This was a fairly recent regression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65547
91177308-0d34-0410-b5e6-
96231b3b80d8
}
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));
typedef signed char BOOL;
@protocol NSObject
++ alloc;
+- init;
- (BOOL) isEqual:(id) object;
+- (Class)class;
@end
@interface NSObject < NSObject > {} @end
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