Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
| 2 | // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 3 | // expected-no-diagnostics |
Fariborz Jahanian | 8348de3 | 2011-02-08 00:23:07 +0000 | [diff] [blame] | 4 | // rdar://8962253 |
| 5 | |
| 6 | @interface Singleton { |
| 7 | } |
| 8 | + (Singleton*) instance; |
| 9 | @end |
| 10 | |
| 11 | @implementation Singleton |
| 12 | |
| 13 | - (void) someSelector { } |
| 14 | |
| 15 | + (Singleton*) instance { return 0; } |
| 16 | |
| 17 | + (void) compileError |
| 18 | { |
| 19 | [Singleton.instance someSelector]; // clang issues error here |
| 20 | } |
| 21 | |
| 22 | @end |
| 23 | |