summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/openmp_check.cpp
blob: c9b5eb0b9cba50a7c946ff565c1730f2a5dfd55c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
int nested(int a) {
#pragma omp parallel
  ++a;

  auto F = [&]() { // expected-error {{expected expression}} expected-error {{expected ';' at end of declaration}} expected-warning {{'auto' type specifier is a C++11 extension}}
#pragma omp parallel
    {
#pragma omp target
      ++a;
    }
  };
  F(); // expected-error {{C++ requires a type specifier for all declarations}}
  return a; // expected-error {{expected unqualified-id}}
}// expected-error {{extraneous closing brace ('}')}}
OpenPOWER on IntegriCloud