llvm-project/clang/test/AST/ast-dump-riscv-attributes.cpp
Vincent 385752c9b5
[clang][TableGen] Fix Duplicate Entries in TableGen (#140828)
Fixed TableGen duplicate issues that causes the wrong interrupt
attribute from being selected.

resolves #140701
2025-05-21 12:27:48 -04:00

13 lines
538 B
C++

// 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(){}