2012-12-12 02:53:07 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s
|
2011-02-15 07:59:16 +08:00
|
|
|
|
|
|
|
@interface I
|
2011-07-29 07:19:50 +08:00
|
|
|
- Meth; // expected-note{{method definition for 'Meth' not found}} \
|
2012-02-28 06:55:11 +08:00
|
|
|
// expected-note{{method 'Meth' declared here}}
|
2012-12-12 02:53:07 +08:00
|
|
|
- unavailableMeth __attribute__((availability(macosx,unavailable)));
|
|
|
|
- unavailableMeth2 __attribute__((unavailable));
|
2011-02-15 07:59:16 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I // expected-warning{{incomplete implementation}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I(CAT)
|
2011-07-29 07:19:50 +08:00
|
|
|
- Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
|
2011-02-15 07:59:16 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wincomplete-implementation"
|
|
|
|
@interface I2
|
2012-02-28 06:55:11 +08:00
|
|
|
- Meth; // expected-note{{method 'Meth' declared here}}
|
2011-02-15 07:59:16 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I2
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I2(CAT)
|
2011-07-29 07:19:50 +08:00
|
|
|
- Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
|
2011-02-15 07:59:16 +08:00
|
|
|
@end
|
|
|
|
|
2011-10-27 08:09:34 +08:00
|
|
|
@interface Q
|
|
|
|
@end
|
|
|
|
|
|
|
|
// rdar://10336158
|
|
|
|
@implementation Q
|
|
|
|
|
|
|
|
__attribute__((visibility("default")))
|
2012-03-24 07:24:23 +08:00
|
|
|
@interface QN // expected-error {{Objective-C declarations may only appear in global scope}}
|
2011-10-27 08:09:34 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@end
|
2011-02-15 07:59:16 +08:00
|
|
|
|