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