diff options
Diffstat (limited to 'test/Sema/attr-unused.c')
-rw-r--r-- | test/Sema/attr-unused.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Sema/attr-unused.c b/test/Sema/attr-unused.c new file mode 100644 index 0000000..dbb5e63 --- /dev/null +++ b/test/Sema/attr-unused.c @@ -0,0 +1,12 @@ +// RUN: clang-cc -verify -fsyntax-only %s + +static void (*fp0)(void) __attribute__((unused)); + +static void __attribute__((unused)) f0(void); + +// On K&R +int f1() __attribute__((unused)); + +int g0 __attribute__((unused)); + +int f2() __attribute__((unused(1, 2))); // expected-error {{attribute requires 0 argument(s)}} |