brintos

brintos / llvm-project-archived public Read only

0
0
Text · 790 B · fa0d9ac Raw
38 lines · cpp
1// RUN: %clang_cc1 -fopenmp -fopenmp-version=60 -x c++ -std=c++11 -ast-print %s | FileCheck %s2// expected-no-diagnostics3 4extern int bar(int);5 6int foo(int arg)7{8  #pragma omp assume no_openmp_routines9  {10    auto fn = [](int x) { return bar(x); };11// CHECK: auto fn = [](int x) {12    return fn(5);13  }14  #pragma omp assume no_openmp_constructs15  {16    auto fn = [](int x) { return bar(x); };17// CHECK: auto fn = [](int x) {18    return fn(6);19  }20}21 22class C {23public:24  int foo(int a);25};26 27// We're really just checking that this parses.  All the assumptions are thrown28// away immediately for now.29int C::foo(int a)30{31  #pragma omp assume holds(sizeof(void*) == 8) absent(parallel)32  {33    auto fn = [](int x) { return bar(x); };34// CHECK: auto fn = [](int x) {35    return fn(5);36  }37}38