blob: 40b14c5c50860351b2b8aa7384e443aa5a43bb86 [file] [log] [blame]
Alexey Bataevdb390212015-05-20 04:24:19 +00001// 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 -fsyntax-only -verify %s -ast-print | FileCheck %s
Alexey Bataeva8a9153a2017-12-29 18:07:07 +00004
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 -fsyntax-only -verify %s -ast-print | FileCheck %s
Alexander Musman80c22892014-07-17 08:54:58 +00008// expected-no-diagnostics
9
10#ifndef HEADER
11#define HEADER
12
13void foo() {}
14
15int main (int argc, char **argv) {
16 int b = argc, c, d, e, f, g;
17 static int a;
18// CHECK: static int a;
19#pragma omp parallel
20{
21#pragma omp master
22{
23 a=2;
24}
25}
26// CHECK-NEXT: #pragma omp parallel
27// CHECK-NEXT: {
Alexey Bataevcbecfdf2018-02-14 17:38:47 +000028// CHECK-NEXT: #pragma omp master{{$}}
Alexander Musman80c22892014-07-17 08:54:58 +000029// CHECK-NEXT: {
30// CHECK-NEXT: a = 2;
31// CHECK-NEXT: }
32// CHECK-NEXT: }
33 return (0);
34}
35
36#endif