Debian Codegraph @

clang/test/Sema/avr-interript-signal-attr.c

raw
1 // RUN: %clang_cc1 %s -triple avr-unknown-unknown -verify -fsyntax-only
2 struct a { int b; };
3
4 struct a test __attribute__((interrupt)); // expected-warning {{'interrupt' attribute only applies to functions}}
5
6 __attribute__((interrupt(12))) void foo(void) { } // expected-error {{'interrupt' attribute takes no arguments}}
7
8 __attribute__((interrupt)) int fooa(void) { return 0; } // expected-warning {{'interrupt' attribute only applies to functions that have a 'void' return type}}
9
10 __attribute__((interrupt)) void foob(int a) {} // expected-warning {{'interrupt' attribute only applies to functions that have no parameters}}
11
12 __attribute__((signal)) int fooc(void) { return 0; } // expected-warning {{'signal' attribute only applies to functions that have a 'void' return type}}
13
14 __attribute__((signal)) void food(int a) {} // expected-warning {{'signal' attribute only applies to functions that have no parameters}}
15
16 __attribute__((interrupt)) void fooe(void) {}
17
18 __attribute__((interrupt)) void foof() {}
19
20 __attribute__((signal)) void foog(void) {}
21
22 __attribute__((signal)) void fooh() {}