mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 01:26:04 +00:00

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!)
15 lines
523 B
C++
15 lines
523 B
C++
// RUN: %clang_cc1 -fopenacc -ast-print %s -o - | FileCheck %s
|
|
|
|
unsigned Int;
|
|
|
|
void uses() {
|
|
// CHECK: #pragma acc init device_type(*) device_num(Int) if(Int == 5)
|
|
#pragma acc init device_type(*) device_num(Int) if (Int == 5)
|
|
// CHECK: #pragma acc init device_type(*) device_num(Int)
|
|
#pragma acc init device_type(*) device_num(Int)
|
|
// CHECK: #pragma acc init device_type(*) if(Int == 5)
|
|
#pragma acc init device_type(*) if (Int == 5)
|
|
// CHECK: #pragma acc init device_type(SomeName)
|
|
#pragma acc init device_type(SomeName)
|
|
}
|