xref: /llvm-project/clang/test/Sema/avr-interrupt-attr.c (revision e765e0bc8ed06ebb186a9905227273517f0b7240)
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 
foo(void)6 __attribute__((interrupt(12))) void foo(void) { } // expected-error {{'interrupt' attribute takes no arguments}}
7 
food(void)8 __attribute__((interrupt)) void food(void) {}
9