2009-08-12 04:08:03 +08:00
|
|
|
// RUN: clang-cc %s -verify -Wunused -fsyntax-only
|
2007-09-27 06:06:30 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
@interface Greeter
|
|
|
|
+ (void) hello;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Greeter
|
|
|
|
+ (void) hello {
|
|
|
|
fprintf(stdout, "Hello, World!\n");
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2009-08-12 04:08:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@interface NSObject @end
|
|
|
|
@interface NSString : NSObject
|
|
|
|
- (int)length;
|
|
|
|
@end
|
|
|
|
|
|
|
|
void test() {
|
|
|
|
// No unused warning: rdar://7126285
|
|
|
|
@"pointless example call for test purposes".length;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-27 06:06:30 +08:00
|
|
|
int main (void) {
|
|
|
|
[Greeter hello];
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|