1 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu\
2 //RUN: -fopenmp -fopenmp-version=51 \
3 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
4 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
5 //RUN: -ast-print %s | FileCheck %s --check-prefix=PRINT
7 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu\
8 //RUN: -fopenmp -fopenmp-version=51 \
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\
14 //RUN: -fopenmp -fopenmp-version=51 \
15 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
16 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
17 //RUN: -emit-pch -o %t %s
19 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu\
20 //RUN: -fopenmp -fopenmp-version=51 \
21 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
22 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
23 //RUN: -include-pch %t -ast-print %s | FileCheck %s --check-prefix=PRINT
25 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu\
26 //RUN: -fopenmp -fopenmp-version=51 \
27 //RUN: -x c++ -std=c++14 -fexceptions -fcxx-exceptions \
28 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
29 //RUN: -include-pch %t -ast-dump-all %s | FileCheck %s --check-prefix=DUMP
36 #pragma omp scope private(a) reduction(+:i) nowait
44 //DUMP: FunctionDecl {{.*}}foo1 'int ()'
45 //DUMP: OMPScopeDirective
46 //DUMP: OMPPrivateClause
47 //DUMP: DeclRefExpr {{.*}}'int' lvalue Var{{.*}}'a' 'int'
48 //DUMP: OMPReductionClause
49 //DUMP: DeclRefExpr {{.*}}'int' lvalue Var{{.*}}'i' 'int'
50 //DUMP: OMPNowaitClause
51 //PRINT: #pragma omp scope private(a) reduction(+: i) nowait
58 #pragma omp scope private(a) reduction(*:b)
71 //DUMP: FunctionTemplateDecl {{.*}}run
72 //DUMP: TemplateTypeParmDecl {{.*}}referenced typename depth 0 index 0 T
73 //DUMP: FunctionDecl {{.*}}run 'T ()'
74 //DUMP: OMPScopeDirective
75 //DUMP: OMPPrivateClause
76 //DUMP: DeclRefExpr {{.*}}'T' lvalue Var {{.*}} 'a' 'T'
77 //DUMP: OMPReductionClause
78 //DUMP: DeclRefExpr {{.*}}'T' lvalue Var {{.*}} 'b' 'T'
79 //DUMP: FunctionDecl {{.*}}used run 'double ()'
80 //DUMP: TemplateArgument type 'double'
81 //DUMP: BuiltinType {{.*}}'double'
82 //DUMP: OMPScopeDirective
83 //DUMP: OMPPrivateClause
84 //DUMP: DeclRefExpr {{.*}}'double' lvalue Var {{.*}} 'a' 'double'
85 //DUMP: OMPReductionClause
86 //DUMP: DeclRefExpr {{.*}}'double' lvalue Var {{.*}} 'b' 'double'
87 //PRINT: #pragma omp scope private(a) reduction(*: b)