Keep the source location of the selector in ObjCMessageExpr.
[clang.git] / test / SemaObjC / alias-test-1.m
blob2cea115b429ed32d1312f74506cb489f7b379bbb
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @compatibility_alias alias4 foo; // expected-warning {{cannot find interface declaration for 'foo'}}
5 @class class2; // expected-note {{previous declaration is here}}
6 @class class3;
8 typedef int I;  // expected-note {{previous declaration is here}}
10 @compatibility_alias alias1 I;  // expected-warning {{cannot find interface declaration for 'I'}}
12 @compatibility_alias alias class2;     
13 @compatibility_alias alias class3;   // expected-error {{conflicting types for alias 'alias'}}
16 typedef int alias2;     // expected-note {{previous declaration is here}}
17 @compatibility_alias alias2 class3;  // expected-error {{conflicting types for alias 'alias2'}}
19 alias *p;
20 class2 *p2;
22 int foo ()
25         if (p == p2) {
26           int alias = 1;
27         }
29         alias *p3;
30         return p3 == p2;