1 // expected-no-diagnostics
3 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp \
4 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
5 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
6 //RUN: -ast-print %s | FileCheck %s --check-prefix=PRINT
8 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp \
9 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
10 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
11 //RUN: -ast-dump %s | FileCheck %s --check-prefix=DUMP
13 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp \
14 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
15 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
16 //RUN: -emit-pch -o %t %s
18 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp \
19 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
20 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
21 //RUN: -include-pch %t -ast-print %s | FileCheck %s --check-prefix=PRINT
23 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp \
24 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
25 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
26 //RUN: -include-pch %t -ast-dump-all %s | FileCheck %s --check-prefix=DUMP
37 template <unsigned int nRHS
>
39 #pragma omp parallel default(private)
43 // PRINT: #pragma omp parallel default(private)
45 // PRINT-NEXT: this->targetDev++;
47 // DUMP: -OMPParallelDirective
48 // DUMP->NEXT: -OMPDefaultClause
50 // PRINT: template<> void apply<32U>()
51 // PRINT: #pragma omp parallel default(private)
53 // PRINT-NEXT: this->targetDev++;
55 // DUMP: -OMPParallelDirective
56 // DUMP-NEXT: -OMPDefaultClause
66 #pragma omp parallel default(private)
68 // PRINT: #pragma omp parallel default(private)
70 // DUMP: -OMPParallelDirective
71 // DUMP-NEXT: -OMPDefaultClause
72 // DUMP-NEXT: -OMPPrivateClause {{.*}} <implicit>
73 // DUMP-NEXT: -DeclRefExpr {{.*}} 'a'
85 #pragma omp parallel default(private)
92 // PRINT: #pragma omp parallel default(private)
93 // DUMP: -OMPParallelDirective
94 // DUMP-NEXT: -OMPDefaultClause
95 // DUMP-NEXT: -OMPPrivateClause {{.*}} <implicit>
96 // DUMP-NEXT: -DeclRefExpr {{.*}} 'a'
97 // DUMP-NEXT: -DeclRefExpr {{.*}} 'yy'
107 #pragma omp parallel private(z) default(private)
115 // PRINT: #pragma omp parallel private(this->z) default(private)
116 // DUMP: -OMPParallelDirective
117 // DUMP-NEXT: -OMPPrivateClause
118 // DUMP-NEXT: -DeclRefExpr {{.*}} 'z'
119 // DUMP-NEXT: -OMPDefaultClause
120 // DUMP-NEXT: -OMPPrivateClause
121 // DUMP-NEXT: -DeclRefExpr {{.*}} 'f'
122 // DUMP: -CXXThisExpr {{.*}} 'A *' implicit this
124 #pragma omp parallel private(z) default(private)
126 #pragma omp parallel private(z) default(private)
135 // PRINT: #pragma omp parallel private(this->z) default(private)
136 // PRINT: #pragma omp parallel private(this->z) default(private)
137 // DUMP: -OMPParallelDirective
138 // DUMP-NEXT: -OMPPrivateClause
139 // DUMP-NEXT: -DeclRefExpr {{.*}} 'z'
140 // DUMP-NEXT: -OMPDefaultClause
141 // DUMP: -OMPParallelDirective
142 // DUMP-NEXT: -OMPPrivateClause
143 // DUMP-NEXT: -DeclRefExpr {{.*}} 'z'
144 // DUMP-NEXT: -OMPDefaultClause
145 // DUMP-NEXT: -OMPPrivateClause {{.*}} <implicit>
146 // DUMP-NEXT: -DeclRefExpr {{.*}} 'f'
147 // DUMP: -CXXThisExpr
149 // DUMP-NEXT: -CXXThisExpr
150 // DUMP: -CXXThisExpr