aboutsummaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/nothing_messages.cpp
blob: 0e27e3c27076a7b0588625f83e16d0a40caa72f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// RUN: %clang_cc1 -verify=expected -fopenmp -ferror-limit 100 %s -Wuninitialized

int mixed() {
  int x = 0;
  int d = 4;

#pragma omp nothing
  x=d;

  if(!x) {
#pragma omp nothing
    x=d;
  }

  if(!x)
#pragma omp nothing
    x=d;

// expected-warning@+2 {{extra tokens at the end of '#pragma omp nothing' are ignored}}
  if(!x) {
#pragma omp nothing seq_cst
    x=d;
  }

  return 0;
}