2008-08-23 09:48:03 +08:00
|
|
|
// RUN: clang -fsyntax-only -verify %s
|
2007-12-12 14:22:14 +08:00
|
|
|
|
2007-11-10 03:52:12 +08:00
|
|
|
@interface foo
|
|
|
|
- (int)meth;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation foo
|
|
|
|
- (int) meth { return [self meth]; }
|
|
|
|
@end
|
|
|
|
|
2008-08-23 09:48:03 +08:00
|
|
|
// PR2708
|
|
|
|
@interface MyClass
|
|
|
|
+- (void)myMethod; // expected-error {{expected selector for Objective-C method}}
|
|
|
|
- (vid)myMethod2; // expected-error {{expected a type}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MyClass
|
|
|
|
- (void)myMethod { }
|
2008-12-05 09:35:25 +08:00
|
|
|
- (vid)myMethod2 { } // expected-error {{expected a type}}
|
2008-08-23 09:48:03 +08:00
|
|
|
@end
|
|
|
|
|