Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 4cabdfc | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 2 | |
Steve Naroff | cfe8bf3 | 2008-11-18 19:15:30 +0000 | [diff] [blame] | 3 | // Note: GCC doesn't produce any of the following errors. |
Chris Lattner | 5f4a682 | 2008-11-23 23:12:31 +0000 | [diff] [blame] | 4 | @interface Super @end // expected-note {{previous definition is here}} |
Fariborz Jahanian | 4cabdfc | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 5 | |
Chris Lattner | b8b96af | 2008-11-23 22:46:27 +0000 | [diff] [blame] | 6 | @interface MyWpModule @end // expected-note {{previous definition is here}} |
Fariborz Jahanian | 4cabdfc | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 7 | |
| 8 | @compatibility_alias MyAlias MyWpModule; |
| 9 | |
| 10 | @compatibility_alias AliasForSuper Super; |
| 11 | |
Chris Lattner | b8b96af | 2008-11-23 22:46:27 +0000 | [diff] [blame] | 12 | @interface MyAlias : AliasForSuper // expected-error {{duplicate interface definition for class 'MyWpModule'}} |
Fariborz Jahanian | 4cabdfc | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 13 | @end |
| 14 | |
Steve Naroff | cfe8bf3 | 2008-11-18 19:15:30 +0000 | [diff] [blame] | 15 | @implementation MyAlias : AliasForSuper // expected-error {{conflicting super class name 'Super'}} |
Fariborz Jahanian | 4cabdfc | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 16 | @end |
| 17 | |