xref: /llvm-project/clang/test/OpenMP/nothing_messages.cpp (revision 6e0101684e59d5e8b11853a7311c71090547d355)
1 // RUN: %clang_cc1 -verify=expected -fopenmp -ferror-limit 100 %s -Wuninitialized
2 
mixed()3 int mixed() {
4   int x = 0;
5   int d = 4;
6 
7 #pragma omp nothing
8   x=d;
9 
10   if(!x) {
11 #pragma omp nothing
12     x=d;
13   }
14 
15   if(!x)
16 #pragma omp nothing
17     x=d;
18 
19 // expected-warning@+2 {{extra tokens at the end of '#pragma omp nothing' are ignored}}
20   if(!x) {
21 #pragma omp nothing seq_cst
22     x=d;
23   }
24 
25   return 0;
26 }
27