Chris Lattner | e3995fe | 2007-11-06 06:07:26 +0000 | [diff] [blame] | 1 | // RUN: clang %s -verify -fsyntax-only |
| 2 | |
| 3 | void foo(void); |
Steve Naroff | adbbd0c | 2008-01-14 20:51:29 +0000 | [diff] [blame^] | 4 | void foo(void) {} |
Chris Lattner | e3995fe | 2007-11-06 06:07:26 +0000 | [diff] [blame] | 5 | void foo(void); |
Steve Naroff | adbbd0c | 2008-01-14 20:51:29 +0000 | [diff] [blame^] | 6 | void foo(void); // expected-error{{previous definition is here}} |
Chris Lattner | e3995fe | 2007-11-06 06:07:26 +0000 | [diff] [blame] | 7 | |
| 8 | void foo(int); // expected-error {{redefinition of 'foo'}} |
Steve Naroff | adbbd0c | 2008-01-14 20:51:29 +0000 | [diff] [blame^] | 9 | |
| 10 | int funcdef() |
| 11 | { |
| 12 | return 0; |
| 13 | } |
| 14 | |
| 15 | int funcdef(); |
| 16 | |
| 17 | int funcdef2() { return 0; } // expected-error{{previous definition is here}} |
| 18 | int funcdef2() { return 0; } // expected-error {{redefinition of 'funcdef2'}} |
| 19 | |