1 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -ast-print %s | FileCheck %s 2 // expected-no-diagnostics 3 4 extern int bar(int); 5 6 int foo(int arg) 7 { 8 #pragma omp assume no_openmp_routines 9 { 10 auto fn = [](int x) { return bar(x); }; 11 // CHECK: auto fn = [](int x) { 12 return fn(5); 13 } 14 } 15 16 class C { 17 public: 18 int foo(int a); 19 }; 20 21 // We're really just checking that this parses. All the assumptions are thrown 22 // away immediately for now. 23 int C::foo(int a) 24 { 25 #pragma omp assume holds(sizeof(void*) == 8) absent(parallel) 26 { 27 auto fn = [](int x) { return bar(x); }; 28 // CHECK: auto fn = [](int x) { 29 return fn(5); 30 } 31 } 32