Keep the source location of the selector in ObjCMessageExpr.
[clang.git] / test / SemaObjC / conflicting-ivar-test-1.m
blob1c68a23d7e28e9da478d7d6abea290e46c55d3b8
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @interface INTF 
5 @public
6         int IVAR; // expected-note {{previous definition is here}}
8 @end
10 @implementation INTF
12 @private
14         int XIVAR; // expected-error {{conflicting instance variable names: 'XIVAR' vs 'IVAR'}}
16 @end
20 @interface INTF1 
22 @public
23         int IVAR;
24         int IVAR1; // expected-error {{inconsistent number of instance variables specified}}
26 @end
28 @implementation INTF1
30 @private
32         int IVAR;
34 @end
37 @interface INTF2 
39 @public
40         int IVAR;
42 @end
44 @implementation INTF2
46 @private
48         int IVAR;
49         int IVAR1; // expected-error {{inconsistent number of instance variables specified}}
51 @end
54 @interface INTF3
56 @public
57         int IVAR; // expected-note {{previous definition is here}}
59 @end
61 @implementation INTF3
63 @private
65         short IVAR; // expected-error {{instance variable 'IVAR' has conflicting type: 'short' vs 'int'}}
67 @end
69 @implementation  INTF4 // expected-warning {{cannot find interface declaration for 'INTF4'}}
71 @private
73         short IVAR;
75 @end
77 @interface INTF5
79   char * ch;
81 @end
83 @implementation  INTF5
86 @end