2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -fsyntax-only
|
2013-12-09 06:22:31 +08:00
|
|
|
// FIXME: This test needs needs to be run with -verify
|
2007-10-13 00:15:17 +08:00
|
|
|
|
|
|
|
@interface NSObject
|
|
|
|
+ alloc;
|
|
|
|
- init;
|
|
|
|
@end
|
2007-10-10 06:01:59 +08:00
|
|
|
|
|
|
|
struct D {
|
|
|
|
double d;
|
|
|
|
};
|
|
|
|
|
|
|
|
@interface Foo : NSObject
|
|
|
|
|
|
|
|
- method:(int)a;
|
|
|
|
- method:(int)a;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Bar : NSObject
|
|
|
|
|
|
|
|
- method:(void *)a;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Car : NSObject
|
|
|
|
|
|
|
|
- method:(struct D)a;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Zar : NSObject
|
|
|
|
|
|
|
|
- method:(float)a;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Rar : NSObject
|
|
|
|
|
|
|
|
- method:(float)a;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
int main() {
|
2007-10-13 00:15:17 +08:00
|
|
|
id xx = [[Car alloc] init]; // expected-warning {{incompatible types assigning 'int' to 'id'}}
|
2007-10-10 06:01:59 +08:00
|
|
|
|
2007-10-11 05:53:07 +08:00
|
|
|
[xx method:4];
|
2007-10-10 06:01:59 +08:00
|
|
|
}
|