Chris Lattner | 5519644 | 2007-11-20 19:04:50 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify -pedantic %s |
| 2 | |
| 3 | int foo(); |
| 4 | int foo() |
| 5 | { |
| 6 | return 0; |
| 7 | } |
| 8 | |
| 9 | int bar(); |
| 10 | int bar(int i) // expected-error {{previous definition is here}} |
| 11 | { |
| 12 | return 0; |
| 13 | } |
| 14 | int bar() // expected-error {{redefinition of 'bar'}} |
| 15 | { |
| 16 | return 0; |
| 17 | } |
| 18 | |
| 19 | int foobar(int); // expected-error {{previous definition is here}} |
| 20 | int foobar() // expected-error {{redefinition of 'foobar'}} |
| 21 | { |
| 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | int wibble(); // expected-error {{previous definition is here}} |
| 26 | float wibble() // expected-error {{redefinition of 'wibble'}} |
| 27 | { |
| 28 | return 0.0f; |
| 29 | } |