2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
|
|
|
// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2011-02-08 08:23:07 +08:00
|
|
|
// rdar://8962253
|
|
|
|
|
|
|
|
@interface Singleton {
|
|
|
|
}
|
|
|
|
+ (Singleton*) instance;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Singleton
|
|
|
|
|
|
|
|
- (void) someSelector { }
|
|
|
|
|
|
|
|
+ (Singleton*) instance { return 0; }
|
|
|
|
|
|
|
|
+ (void) compileError
|
|
|
|
{
|
|
|
|
[Singleton.instance someSelector]; // clang issues error here
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|