brintos

brintos / llvm-project-archived public Read only

0
0
Text · 905 B · c1ad380 Raw
36 lines · cpp
1// Test without serialization:2// RUN: %clang_cc1 -std=c++20 -fopenmp  %s -ast-dump | FileCheck %s3 4// Test with serialization:5// RUN: %clang_cc1 -std=c++20 -fopenmp  -emit-pch -o %t %s6// RUN: %clang_cc1 -x c++ -std=c++20 -fopenmp -include-pch %t -ast-dump-all /dev/null  \7// RUN:   | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \8// RUN:   | FileCheck %s9 10// CHECK: OMPTargetUpdateDirective11// CHECK-NEXT: OMPFromClause12// CHECK-NEXT: ArraySubscriptExpr13// CHECK: DeclRefExpr {{.*}} 'a'14// CHECK: DeclRefExpr {{.*}} 'it'15 16 17void foo1() {18  int a[10];19 20#pragma omp target update from(iterator(int it = 0:10) : a[it])21  ;22}23 24// CHECK: OMPTargetUpdateDirective25// CHECK-NEXT: OMPToClause26// CHECK-NEXT: ArraySubscriptExpr27// CHECK: DeclRefExpr {{.*}} 'a'28// CHECK: DeclRefExpr {{.*}} 'it'29 30void foo2() {31  int a[10];32 33#pragma omp target update to(iterator(int it = 0:10) : a[it])34  ;35}36