arg-duplicate.c 379 B

123456789101112131415
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. int f3(y, x,
  3. x) // expected-error {{redefinition of parameter}}
  4. int y,
  5. x, // expected-note {{previous declaration is here}}
  6. x; // expected-error {{redefinition of parameter}}
  7. {
  8. return x + y;
  9. }
  10. void f4(void) {
  11. f3 (1, 1, 2, 3, 4); // expected-warning{{too many arguments}}
  12. }