| 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 -verify %s -ast-print | FileCheck %s |
| 4 |
|
| 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 -verify %s -ast-print | FileCheck %s |
| 8 |
// expected-no-diagnostics |
| 9 |
|
| 10 |
#ifndef HEADER |
| 11 |
#define HEADER |
| 12 |
|
| 13 |
int main (int argc, char **argv) { |
| 14 |
// CHECK: int main(int argc, char **argv) { |
| 15 |
#pragma omp parallel |
| 16 |
{ |
| 17 |
#pragma omp cancellation point parallel |
| 18 |
} |
| 19 |
// CHECK: #pragma omp parallel |
| 20 |
// CHECK-NEXT: { |
| 21 |
// CHECK-NEXT: #pragma omp cancellation point parallel{{$}} |
| 22 |
// CHECK-NEXT: } |
| 23 |
#pragma omp sections |
| 24 |
{ |
| 25 |
#pragma omp cancellation point sections |
| 26 |
} |
| 27 |
// CHECK-NEXT: #pragma omp sections |
| 28 |
// CHECK: { |
| 29 |
// CHECK: #pragma omp cancellation point sections |
| 30 |
// CHECK: } |
| 31 |
#pragma omp for |
| 32 |
for (int i = 0; i < argc; ++i) { |
| 33 |
#pragma omp cancellation point for |
| 34 |
} |
| 35 |
// CHECK: #pragma omp for |
| 36 |
// CHECK-NEXT: for (int i = 0; i < argc; ++i) { |
| 37 |
// CHECK-NEXT: #pragma omp cancellation point for |
| 38 |
// CHECK-NEXT: } |
| 39 |
#pragma omp task |
| 40 |
{ |
| 41 |
#pragma omp cancellation point taskgroup |
| 42 |
} |
| 43 |
// CHECK: #pragma omp task |
| 44 |
// CHECK: { |
| 45 |
// CHECK: #pragma omp cancellation point taskgroup |
| 46 |
// CHECK: } |
| 47 |
// CHECK: return argc; |
| 48 |
return argc; |
| 49 |
} |
| 50 |
|
| 51 |
#endif |