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
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
20 S1
& operator +(const S1
&);
21 S1
& operator *(const S1
&);
22 S1
& operator &&(const S1
&);
23 S1
& operator ^(const S1
&);
34 S7(typename
T::type v
) : a(v
) {
35 #pragma omp taskgroup task_reduction(+ : a) task_reduction(*: b[:])
36 for (int k
= 0; k
< a
.a
; ++k
)
39 S7
&operator=(S7
&s
) {
40 #pragma omp taskgroup task_reduction(&& : this->a) task_reduction(^: b[s.a.a])
41 for (int k
= 0; k
< s
.a
.a
; ++k
)
47 // CHECK: #pragma omp taskgroup task_reduction(+: this->a) task_reduction(*: this->b[:])
48 // CHECK: #pragma omp taskgroup task_reduction(&&: this->a) task_reduction(^: this->b[s.a.a])
49 // CHECK: #pragma omp taskgroup task_reduction(+: this->a) task_reduction(*: this->b[:])
51 class S8
: public S7
<S1
> {
55 S8(int v
) : S7
<S1
>(v
){
56 #pragma omp taskgroup task_reduction(^ : S7 < S1 > ::a) task_reduction(+ : S7 < S1 > ::b[ : S7 < S1 > ::a.a])
57 for (int k
= 0; k
< a
.a
; ++k
)
60 S8
&operator=(S8
&s
) {
61 #pragma omp taskgroup task_reduction(* : this->a) task_reduction(&&:this->b[a.a:])
62 for (int k
= 0; k
< s
.a
.a
; ++k
)
68 // CHECK: #pragma omp taskgroup task_reduction(^: this->S7<S1>::a) task_reduction(+: this->S7<S1>::b[:this->S7<S1>::a.a])
69 // CHECK: #pragma omp taskgroup task_reduction(*: this->a) task_reduction(&&: this->b[this->a.a:])
71 int main (int argc
, char **argv
) {
72 int b
= argc
, c
, d
, e
, f
, g
;
74 // CHECK: static int a;
77 // CHECK-NEXT: #pragma omp taskgroup{{$}}
81 #pragma omp taskgroup task_reduction(min: a)
83 // CHECK-NEXT: #pragma omp taskgroup task_reduction(min: a)
85 // CHECK-NEXT: return 0;