mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-14 14:56:47 +00:00
![Dylan McKay](/assets/img/avatar_default.png)
Summary: This teaches clang how to parse and lower the 'interrupt' and 'naked' attributes. This allows interrupt signal handlers to be written. Reviewers: aaron.ballman Subscribers: malcolm.parsons, cfe-commits Differential Revision: https://reviews.llvm.org/D28451 llvm-svn: 294402
9 lines
350 B
C
9 lines
350 B
C
// RUN: %clang_cc1 %s -triple avr-unknown-unknown -verify -fsyntax-only
|
|
struct a { int b; };
|
|
|
|
struct a test __attribute__((signal)); // expected-warning {{'signal' attribute only applies to functions}}
|
|
|
|
__attribute__((signal(12))) void foo(void) { } // expected-error {{'signal' attribute takes no arguments}}
|
|
|
|
__attribute__((signal)) void food() {}
|