| 1 | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -fopenmp-version=50 -ast-dump %s 2>&1 | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s |
| 2 | |
| 3 | // REQUIRES: broken-PR41022 |
| 4 | // https://bugs.llvm.org/show_bug.cgi?id=41022 |
| 5 | |
| 6 | void test_zero() { |
| 7 | #pragma omp parallel master |
| 8 | ; |
| 9 | } |
| 10 | // CHECK: {{.*}}ast-dump-openmp-parallel-master-XFAIL.c:4:22: warning: extra tokens at the end of '#pragma omp parallel' are ignored |
| 11 | |
| 12 | void test_one() { |
| 13 | #pragma omp parallel master |
| 14 | { ; } |
| 15 | } |
| 16 | // CHECK: {{.*}}ast-dump-openmp-parallel-master-XFAIL.c:10:22: warning: extra tokens at the end of '#pragma omp parallel' are ignored |
| 17 | |
| 18 | // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> |
| 19 | // CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel-master-XFAIL.c:3:1, line:6:1> line:3:6 test_zero 'void ()' |
| 20 | // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:18, line:6:1> |
| 21 | // CHECK-NEXT: | `-OMPParallelDirective {{.*}} <line:4:9, col:28> |
| 22 | // CHECK-NEXT: | `-CapturedStmt {{.*}} <line:5:3> |
| 23 | // CHECK-NEXT: | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow |
| 24 | // CHECK-NEXT: | |-NullStmt {{.*}} <col:3> openmp_structured_block |
| 25 | // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <line:4:9> col:9 implicit .global_tid. 'const int *const restrict' |
| 26 | // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:9> col:9 implicit .bound_tid. 'const int *const restrict' |
| 27 | // CHECK-NEXT: | `-ImplicitParamDecl {{.*}} <col:9> col:9 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-parallel-master-XFAIL.c:4:9) *const restrict' |
| 28 | // CHECK-NEXT: `-FunctionDecl {{.*}} <line:9:1, line:12:1> line:9:6 test_one 'void ()' |
| 29 | // CHECK-NEXT: `-CompoundStmt {{.*}} <col:17, line:12:1> |
| 30 | // CHECK-NEXT: `-OMPParallelDirective {{.*}} <line:10:9, col:28> |
| 31 | // CHECK-NEXT: `-CapturedStmt {{.*}} <line:11:3, col:7> |
| 32 | // CHECK-NEXT: `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow |
| 33 | // CHECK-NEXT: |-CompoundStmt {{.*}} <col:3, col:7> openmp_structured_block |
| 34 | // CHECK-NEXT: | `-NullStmt {{.*}} <col:5> |
| 35 | // CHECK-NEXT: |-ImplicitParamDecl {{.*}} <line:10:9> col:9 implicit .global_tid. 'const int *const restrict' |
| 36 | // CHECK-NEXT: |-ImplicitParamDecl {{.*}} <col:9> col:9 implicit .bound_tid. 'const int *const restrict' |
| 37 | // CHECK-NEXT: `-ImplicitParamDecl {{.*}} <col:9> col:9 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-parallel-master-XFAIL.c:10:9) *const restrict' |
| 38 | |