// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -fopenmp-version=51 \
// RUN: -fsyntax-only -verify %s
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -fopenmp-version=51 \
// RUN: -ast-print %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -fopenmp-version=51 \
// RUN: -emit-pch -o %t %s
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -fopenmp-version=51 \
// RUN: -include-pch %t -ast-print %s | FileCheck %s
// expected-no-diagnostics
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_null_allocator;
extern const omp_allocator_handle_t omp_default_mem_alloc;
extern const omp_allocator_handle_t omp_large_cap_mem_alloc;
extern const omp_allocator_handle_t omp_const_mem_alloc;
extern const omp_allocator_handle_t omp_high_bw_mem_alloc;
extern const omp_allocator_handle_t omp_low_lat_mem_alloc;
extern const omp_allocator_handle_t omp_cgroup_mem_alloc;
extern const omp_allocator_handle_t omp_pteam_mem_alloc;
extern const omp_allocator_handle_t omp_thread_mem_alloc;
//CHECK: template <typename T, int C, int D> void templ_foo(T t) {
//CHECK: T j, z;
//CHECK: #pragma omp target teams loop device(D) collapse(C) reduction(+: z) lastprivate(j) bind(thread) num_teams(C + 2)
//CHECK: for (T i = 0; i < t; ++i)
//CHECK: for (j = 0; j < t; ++j)
//CHECK: z += i + j;
//CHECK: }
//CHECK: template<> void templ_foo<int, 2, 0>(int t) {
//CHECK: int j, z;
//CHECK: #pragma omp target teams loop device(0) collapse(2) reduction(+: z) lastprivate(j) bind(thread) num_teams(2 + 2)
//CHECK: for (int i = 0; i < t; ++i)
//CHECK: for (j = 0; j < t; ++j)
//CHECK: z += i + j;
//CHECK: }
void
//CHECK: void test() {
void
//CHECK: void nobindingfunc() {
void
void
// HEADER