llvm-project/clang/test/AST/ast-print-openacc-shutdown-construct.cpp
erichkeane bdf2555308 [OpenACC] Implement 'device_num' clause sema for 'init'/'shutdown'
This is a very simple sema implementation, and just required AST node
plus the existing diagnostics.  This patch adds tests and adds the AST
node required, plus enables it for 'init' and 'shutdown' (only!)
2024-12-19 12:21:51 -08:00

15 lines
555 B
C++

// RUN: %clang_cc1 -fopenacc -ast-print %s -o - | FileCheck %s
unsigned Int;
void uses() {
// CHECK: #pragma acc shutdown device_type(*) device_num(Int) if(Int == 5)
#pragma acc shutdown device_type(*) device_num(Int) if (Int == 5)
// CHECK: #pragma acc shutdown device_type(*) device_num(Int)
#pragma acc shutdown device_type(*) device_num(Int)
// CHECK: #pragma acc shutdown device_type(*) if(Int == 5)
#pragma acc shutdown device_type(*) if (Int == 5)
// CHECK: #pragma acc shutdown device_type(SomeName)
#pragma acc shutdown device_type(SomeName)
}