From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/Sema/arg-duplicate.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 clang/test/Sema/arg-duplicate.c (limited to 'clang/test/Sema/arg-duplicate.c') diff --git a/clang/test/Sema/arg-duplicate.c b/clang/test/Sema/arg-duplicate.c new file mode 100644 index 0000000..feeb458 --- /dev/null +++ b/clang/test/Sema/arg-duplicate.c @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +int f3(y, x, + x) // expected-error {{redefinition of parameter}} + int y, + x, // expected-note {{previous declaration is here}} + x; // expected-error {{redefinition of parameter}} +{ + return x + y; +} + +void f4(void) { + f3 (1, 1, 2, 3, 4); // expected-warning{{too many arguments}} +} + -- cgit v1.2.3