Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 3e7fd15 | 2007-10-16 21:52:23 +0000 | [diff] [blame] | 2 | |
| 3 | @interface Subclass |
| 4 | { |
| 5 | int ivar; |
| 6 | } |
| 7 | |
Fariborz Jahanian | 7209646 | 2011-12-13 19:40:34 +0000 | [diff] [blame^] | 8 | - (void) method; // expected-note {{previous declaration is here}} |
| 9 | - (void) method; // expected-warning {{multiple declarations of method 'method' found and ignored}} |
Fariborz Jahanian | 3e7fd15 | 2007-10-16 21:52:23 +0000 | [diff] [blame] | 10 | @end |
| 11 | |
| 12 | @implementation Subclass |
Chris Lattner | 5f4a682 | 2008-11-23 23:12:31 +0000 | [diff] [blame] | 13 | - (void) method {;} // expected-note {{previous declaration is here}} |
Fariborz Jahanian | 3e7fd15 | 2007-10-16 21:52:23 +0000 | [diff] [blame] | 14 | - (void) method {;} // expected-error {{duplicate declaration of method 'method'}} |
| 15 | @end |
| 16 | |
| 17 | int main (void) { |
| 18 | return 0; |
| 19 | } |