
Researching in prep of doing the implementation for lowering, I found that the source of the valid identifiers list from flang is in the frontend. This patch adds the same list to the frontend, but does it as a sema diagnostic, so we still parse it as an identifier/identifier-like thing, but then diagnose it as invalid later.
15 lines
519 B
C++
15 lines
519 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(radeon)
|
|
#pragma acc init device_type(radeon)
|
|
}
|