1 // RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s 2 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s 3 // RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -verify %s -ast-print | FileCheck %s 4 // expected-no-diagnostics 5 6 #ifndef HEADER 7 #define HEADER 8 9 extern int qux(int); 10 11 template<typename T> 12 int foo(T arg) 13 { 14 #pragma omp assume no_openmp_routines 15 { 16 auto fn = [](int x) { return qux(x); }; 17 // CHECK: auto fn = [](int x) { 18 return fn(5); 19 } 20 } 21 22 template<typename T> 23 class C { 24 T m; 25 26 public: 27 T bar(T a); 28 }; 29 30 // We're really just checking this parses. All the assumptions are thrown 31 // away immediately for now. 32 template<typename T> 33 T C<T>::bar(T a) 34 { 35 #pragma omp assume holds(sizeof(T) == 8) absent(parallel) 36 { 37 return (T)qux((int)a); 38 // CHECK: return (T)qux((int)a); 39 } 40 } 41 42 #endif 43