2009-12-15 23:14:24 +03:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2008-09-30 18:38:43 +04:00
|
|
|
|
|
|
|
typedef struct { int y; } Abstract;
|
|
|
|
|
|
|
|
typedef struct { int x; } Alternate;
|
|
|
|
|
|
|
|
#define INTERFERE_TYPE Alternate*
|
|
|
|
|
|
|
|
@protocol A
|
2008-11-24 02:26:13 +03:00
|
|
|
@property Abstract *x; // expected-note {{using}}
|
2008-09-30 18:38:43 +04:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface B
|
2008-11-24 02:26:13 +03:00
|
|
|
@property Abstract *y; // expected-note {{using}}
|
2008-09-30 18:38:43 +04:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface B (Category)
|
2008-11-24 02:26:13 +03:00
|
|
|
@property Abstract *z; // expected-note {{using}}
|
2008-09-30 18:38:43 +04:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface InterferencePre
|
2008-11-24 02:26:13 +03:00
|
|
|
-(void) x; // expected-note {{also found}}
|
|
|
|
-(void) y; // expected-note {{also found}}
|
|
|
|
-(void) z; // expected-note {{also found}}
|
2008-10-21 14:37:50 +04:00
|
|
|
-(void) setX: (INTERFERE_TYPE) arg;
|
|
|
|
-(void) setY: (INTERFERE_TYPE) arg;
|
|
|
|
-(void) setZ: (INTERFERE_TYPE) arg;
|
2008-09-30 18:38:43 +04:00
|
|
|
@end
|
|
|
|
|
|
|
|
void f0(id a0) {
|
|
|
|
Abstract *l = [a0 x]; // expected-warning {{multiple methods named 'x' found}}
|
|
|
|
}
|
|
|
|
|
|
|
|
void f1(id a0) {
|
|
|
|
Abstract *l = [a0 y]; // expected-warning {{multiple methods named 'y' found}}
|
|
|
|
}
|
|
|
|
|
|
|
|
void f2(id a0) {
|
|
|
|
Abstract *l = [a0 z]; // expected-warning {{multiple methods named 'z' found}}
|
|
|
|
}
|
|
|
|
|
|
|
|
void f3(id a0, Abstract *a1) {
|
2008-10-21 14:37:50 +04:00
|
|
|
[ a0 setX: a1];
|
2008-09-30 18:38:43 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void f4(id a0, Abstract *a1) {
|
2008-10-21 14:37:50 +04:00
|
|
|
[ a0 setY: a1];
|
2008-09-30 18:38:43 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void f5(id a0, Abstract *a1) {
|
2008-10-21 14:37:50 +04:00
|
|
|
[ a0 setZ: a1];
|
2008-09-30 18:38:43 +04:00
|
|
|
}
|