Shih-wei Liao | f8fd82b | 2010-02-10 11:10:31 -0800 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | @compatibility_alias alias4 foo; // expected-warning {{cannot find interface declaration for 'foo'}} |
| 4 | |
| 5 | @class class2; // expected-note {{previous declaration is here}} |
| 6 | @class class3; |
| 7 | |
| 8 | typedef int I; // expected-note {{previous declaration is here}} |
| 9 | |
| 10 | @compatibility_alias alias1 I; // expected-warning {{cannot find interface declaration for 'I'}} |
| 11 | |
| 12 | @compatibility_alias alias class2; |
| 13 | @compatibility_alias alias class3; // expected-error {{conflicting types for alias 'alias'}} |
| 14 | |
| 15 | |
| 16 | typedef int alias2; // expected-note {{previous declaration is here}} |
| 17 | @compatibility_alias alias2 class3; // expected-error {{conflicting types for alias 'alias2'}} |
| 18 | |
| 19 | alias *p; |
| 20 | class2 *p2; |
| 21 | |
| 22 | int foo () |
| 23 | { |
| 24 | |
| 25 | if (p == p2) { |
| 26 | int alias = 1; |
| 27 | } |
| 28 | |
| 29 | alias *p3; |
| 30 | return p3 == p2; |
| 31 | } |