diff options
Diffstat (limited to 'test/Sema/attr-msp430.c')
-rw-r--r-- | test/Sema/attr-msp430.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/Sema/attr-msp430.c b/test/Sema/attr-msp430.c index 26b2d8fcfd..4b38d09b86 100644 --- a/test/Sema/attr-msp430.c +++ b/test/Sema/attr-msp430.c @@ -1,6 +1,13 @@ // RUN: %clang_cc1 -triple msp430-unknown-unknown -fsyntax-only -verify %s +__attribute__((interrupt(1))) int t; // expected-warning {{'interrupt' attribute only applies to functions}} + int i; -void f(void) __attribute__((interrupt(i))); /* expected-error {{'interrupt' attribute requires an integer constant}} */ +__attribute__((interrupt(i))) void f(void); // expected-error {{'interrupt' attribute requires an integer constant}} +__attribute__((interrupt(1, 2))) void f2(void); // expected-error {{'interrupt' attribute takes one argument}} +__attribute__((interrupt(1))) int f3(void); // expected-warning {{MSP430 'interrupt' attribute only applies to functions that have a 'void' return type}} +__attribute__((interrupt(1))) void f4(int a); // expected-warning {{MSP430 'interrupt' attribute only applies to functions that have no parameters}} +__attribute__((interrupt(64))) void f5(void); // expected-error {{'interrupt' attribute parameter 64 is out of bounds}} -void f2(void) __attribute__((interrupt(12))); +__attribute__((interrupt(0))) void f6(void); +__attribute__((interrupt(63))) void f7(void); |