diff options
Diffstat (limited to 'test/Sema/avr-interrupt-attr.c')
-rw-r--r-- | test/Sema/avr-interrupt-attr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/avr-interrupt-attr.c b/test/Sema/avr-interrupt-attr.c new file mode 100644 index 000000000000..2dfc72a354da --- /dev/null +++ b/test/Sema/avr-interrupt-attr.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 %s -triple avr-unknown-unknown -verify -fsyntax-only +struct a { int b; }; + +struct a test __attribute__((interrupt)); // expected-warning {{'interrupt' attribute only applies to functions}} + +__attribute__((interrupt(12))) void foo(void) { } // expected-error {{'interrupt' attribute takes no arguments}} + +__attribute__((interrupt)) void food() {} |