llvm-project/clang/test/OpenMP/target_update_iterator_ast_print.cpp
ShashwathiNavada 9afb651613
Adding support for iterator in motion clauses. (#159112)
As described in section 2.14.6 of openmp spec, the patch implements
support for iterator in motion clauses.

---------

Co-authored-by: Shashwathi N <nshashwa@pe31.hpc.amslabs.hpecorp.net>
2025-12-01 14:03:32 +05:30

17 lines
484 B
C++

// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=51 -ast-print %s | FileCheck %s
// expected-no-diagnostics
#ifndef HEADER
#define HEADER
void test() {
int a[10];
#pragma omp target update to(iterator(int it = 0:10): a[it])
// CHECK: int a[10];
// CHECK: #pragma omp target update to(iterator(int it = 0:10): a[it])
#pragma omp target update from(iterator(int it = 0:10): a[it])
// CHECK: #pragma omp target update from(iterator(int it = 0:10): a[it])
}
#endif