1 // RUN: %clang_cc1 -triple x86_64 -verify=expected,dev -std=c++11\ 2 // RUN: -verify-ignore-unexpected=note \ 3 // RUN: -fopenmp -fopenmp-version=50 -o - %s 4 5 // expected-no-diagnostics 6 7 // Test no infinite recursion in DeferredDiagnosticEmitter. 8 constexpr int foo(int *x) { 9 return 0; 10 } 11 12 int a = foo(&a); 13 14 // Test no crash when both caller and callee have target directives. 15 int foo(); 16 17 class B { 18 public: 19 void barB(int *isHost) { 20 #pragma omp target map(tofrom: isHost) 21 { 22 *isHost = foo(); 23 } 24 } 25 }; 26 27 class A : public B { 28 public: 29 void barA(int *isHost) { 30 #pragma omp target map(tofrom: isHost) 31 { 32 barB(isHost); 33 } 34 } 35 }; 36