aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ast-dump-riscv-attributes.cpp
blob: 7efe6260723119faa70b2162eacda7905255a165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -triple riscv64 -ast-dump -ast-dump-filter c23 -std=c23 -x c %s | FileCheck --strict-whitespace %s

// CHECK:       FunctionDecl{{.*}}pre_c23
// CHECK-NEXT:    |-CompoundStmt
// CHECK-NEXT:    `-RISCVInterruptAttr{{.*}}supervisor
__attribute__((interrupt("supervisor"))) void pre_c23(){}

// CHECK:       FunctionDecl{{.*}}in_c23
// CHECK-NEXT:    |-CompoundStmt
// CHECK-NEXT:    `-RISCVInterruptAttr{{.*}}supervisor
// CHECK-NOT:     `-RISCVInterruptAttr{{.*}}machine
[[gnu::interrupt("supervisor")]] void in_c23(){}