xref: /llvm-project/clang/test/AST/ast-dump-openmp-target-parallel.c (revision 25098736c1b6a716711a64fa45f7f34ccdbef6d1)
1fdb3d9b8SRoman Lebedev // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
2fdb3d9b8SRoman Lebedev 
test(void)3*25098736SAaron Ballman void test(void) {
4fdb3d9b8SRoman Lebedev #pragma omp target parallel
5fdb3d9b8SRoman Lebedev   ;
6fdb3d9b8SRoman Lebedev }
7fdb3d9b8SRoman Lebedev 
8fdb3d9b8SRoman Lebedev // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
9*25098736SAaron Ballman // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-parallel.c:3:1, line:6:1> line:3:6 test 'void (void)'
10*25098736SAaron Ballman // CHECK-NEXT:   `-CompoundStmt {{.*}} <col:17, line:6:1>
1191f8066dSJoel E. Denny // CHECK-NEXT:     `-OMPTargetParallelDirective {{.*}} <line:4:1, col:28>
12fdb3d9b8SRoman Lebedev // CHECK-NEXT:       `-CapturedStmt {{.*}} <line:5:3>
13fdb3d9b8SRoman Lebedev // CHECK-NEXT:         `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
14fdb3d9b8SRoman Lebedev // CHECK-NEXT:           |-CapturedStmt {{.*}} <col:3>
15fdb3d9b8SRoman Lebedev // CHECK-NEXT:           | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
16fdb3d9b8SRoman Lebedev // CHECK-NEXT:           |   |-CapturedStmt {{.*}} <col:3>
17fdb3d9b8SRoman Lebedev // CHECK-NEXT:           |   | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
18d5edcb90SRoman Lebedev // CHECK-NEXT:           |   |   |-NullStmt {{.*}} <col:3>
1991f8066dSJoel E. Denny // CHECK-NEXT:           |   |   |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
2091f8066dSJoel E. Denny // CHECK-NEXT:           |   |   |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
2150542d50SShafik Yaghmour // CHECK-NEXT:           |   |   `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-target-parallel.c:4:1) *const restrict'
2250542d50SShafik Yaghmour // CHECK-NEXT:           |   |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-target-parallel.c:4:1) *const restrict'
2391f8066dSJoel E. Denny // CHECK-NEXT:           |   |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition
24fdb3d9b8SRoman Lebedev // CHECK-NEXT:           |   | `-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit
25fdb3d9b8SRoman Lebedev // CHECK-NEXT:           |   `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
26d5edcb90SRoman Lebedev // CHECK-NEXT:           |     |-NullStmt {{.*}} <line:5:3>
2791f8066dSJoel E. Denny // CHECK-NEXT:           |     |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
2891f8066dSJoel E. Denny // CHECK-NEXT:           |     |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
2950542d50SShafik Yaghmour // CHECK-NEXT:           |     `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-target-parallel.c:4:1) *const restrict'
30fdb3d9b8SRoman Lebedev // CHECK-NEXT:           |-AlwaysInlineAttr {{.*}} <<invalid sloc>> Implicit __forceinline
3191f8066dSJoel E. Denny // CHECK-NEXT:           |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .global_tid. 'const int'
3291f8066dSJoel E. Denny // CHECK-NEXT:           |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .part_id. 'const int *const restrict'
3391f8066dSJoel E. Denny // CHECK-NEXT:           |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .privates. 'void *const restrict'
3491f8066dSJoel E. Denny // CHECK-NEXT:           |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .copy_fn. 'void (*const restrict)(void *const restrict, ...)'
3591f8066dSJoel E. Denny // CHECK-NEXT:           |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .task_t. 'void *const'
3650542d50SShafik Yaghmour // CHECK-NEXT:           |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-target-parallel.c:4:1) *const restrict'
3791f8066dSJoel E. Denny // CHECK-NEXT:           |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition
38fdb3d9b8SRoman Lebedev // CHECK-NEXT:           | `-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit
39fdb3d9b8SRoman Lebedev // CHECK-NEXT:           `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
40fdb3d9b8SRoman Lebedev // CHECK-NEXT:             |-CapturedStmt {{.*}} <line:5:3>
41fdb3d9b8SRoman Lebedev // CHECK-NEXT:             | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
42d5edcb90SRoman Lebedev // CHECK-NEXT:             |   |-NullStmt {{.*}} <col:3>
4391f8066dSJoel E. Denny // CHECK-NEXT:             |   |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
4491f8066dSJoel E. Denny // CHECK-NEXT:             |   |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
4550542d50SShafik Yaghmour // CHECK-NEXT:             |   `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-target-parallel.c:4:1) *const restrict'
4650542d50SShafik Yaghmour // CHECK-NEXT:             |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-target-parallel.c:4:1) *const restrict'
4791f8066dSJoel E. Denny // CHECK-NEXT:             |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition
48fdb3d9b8SRoman Lebedev // CHECK-NEXT:             | `-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit
49fdb3d9b8SRoman Lebedev // CHECK-NEXT:             `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
50d5edcb90SRoman Lebedev // CHECK-NEXT:               |-NullStmt {{.*}} <line:5:3>
5191f8066dSJoel E. Denny // CHECK-NEXT:               |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
5291f8066dSJoel E. Denny // CHECK-NEXT:               |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
5350542d50SShafik Yaghmour // CHECK-NEXT:               `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-target-parallel.c:4:1) *const restrict'
54