[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / OpenMP / scope_messages.cpp
blobf8d7410122485cb939041e74bf241745c011b0e9
1 // RUN: %clang_cc1 -fopenmp -fopenmp-version=51 %s -verify=expected,omp51
2 // RUN: %clang_cc1 -fopenmp -fopenmp-version=51 %s -verify=expected,omp51
4 void test1()
6 int var1;
7 int var2;
8 int var3 = 1;
10 // expected-error@+1 {{directive '#pragma omp scope' cannot contain more than one 'nowait' clause}} //omp51-error@+1{{unexpected OpenMP clause 'firstprivate' in directive '#pragma omp scope'}}
11 #pragma omp scope private(var1) firstprivate(var3) nowait nowait
12 { var1 = 123; ++var2; var3 = 2;}