1 // RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
2 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s
3 // RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
5 // RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s
6 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -emit-pch -o %t %s
7 // RUN: %clang_cc1 -fopenmp-simd -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
8 // expected-no-diagnostics
15 template <class T
, int N
>
17 T b
= argc
, c
, d
, e
, f
, g
;
21 #pragma omp sections private(argc, b), firstprivate(c, d), lastprivate(d, f) reduction(task, - : g) nowait allocate(d)
25 // CHECK-NEXT: #pragma omp parallel
26 // CHECK-NEXT: #pragma omp sections private(argc,b) firstprivate(c,d) lastprivate(d,f) reduction(task, -: g) nowait allocate(d){{$}}
33 int main(int argc
, char **argv
) {
34 // CHECK: int main(int argc, char **argv) {
35 int b
= argc
, c
, d
, e
, f
, g
;
37 // CHECK: static int a;
39 #pragma omp sections allocate(c) private(argc, b), firstprivate(argv, c), lastprivate(d, f) reduction(+ : g) nowait
46 // CHECK-NEXT: #pragma omp parallel
47 // CHECK-NEXT: #pragma omp sections allocate(c) private(argc,b) firstprivate(argv,c) lastprivate(d,f) reduction(+: g) nowait
49 // CHECK-NEXT: #pragma omp section{{$}}
51 // CHECK-NEXT: #pragma omp section
54 return (tmain
<int, 5>(argc
) + tmain
<char, 1>(argv
[0][0]));