1 // RUN: %clang_cc1 -fopenmp -triple x86_64-pc-linux-gnu -fopenmp-is-target-device -fcxx-exceptions -fexceptions %s -emit-llvm -S -verify -Wopenmp-target-exception -analyze 2 #pragma omp declare target 3 int foo(void) { 4 int error = -1; 5 try { 6 throw 404; 7 } 8 catch (int e){ 9 error = e; 10 } 11 return error; 12 } 13 #pragma omp end declare target 14 // expected-no-diagnostics 15