Home | History | Annotate | Download | only in OpenMP
      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 -fsyntax-only -verify %s -ast-print | FileCheck %s
      4 // expected-no-diagnostics
      5 
      6 #ifndef HEADER
      7 #define HEADER
      8 
      9 void foo() {}
     10 
     11 int main (int argc, char **argv) {
     12   int b = argc, c, d, e, f, g;
     13   static int a;
     14 // CHECK: static int a;
     15 #pragma omp taskgroup
     16   a=2;
     17 // CHECK-NEXT: #pragma omp taskgroup
     18 // CHECK-NEXT: a = 2;
     19 // CHECK-NEXT: ++a;
     20   ++a;
     21 #pragma omp taskgroup
     22   foo();
     23 // CHECK-NEXT: #pragma omp taskgroup
     24 // CHECK-NEXT: foo();
     25 // CHECK-NEXT: return 0;
     26   return 0;
     27 }
     28 
     29 #endif
     30