Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Chris Lattner | d472b31 | 2007-07-21 03:09:58 +0000 | [diff] [blame] | 2 | |
Chris Lattner | d472b31 | 2007-07-21 03:09:58 +0000 | [diff] [blame] | 3 | int f3(y, x, |
| 4 | x) // expected-error {{redefinition of parameter}} |
Chris Lattner | d84aac1 | 2010-02-22 00:40:25 +0000 | [diff] [blame] | 5 | int y, |
| 6 | x, // expected-note {{previous declaration is here}} |
Chris Lattner | d472b31 | 2007-07-21 03:09:58 +0000 | [diff] [blame] | 7 | x; // expected-error {{redefinition of parameter}} |
| 8 | { |
| 9 | return x + y; |
| 10 | } |
| 11 | |
| 12 | void f4(void) { |
Douglas Gregor | 74734d5 | 2009-04-02 15:37:10 +0000 | [diff] [blame] | 13 | f3 (1, 1, 2, 3, 4); // expected-warning{{too many arguments}} |
Chris Lattner | d472b31 | 2007-07-21 03:09:58 +0000 | [diff] [blame] | 14 | } |
| 15 | |