[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / OpenMP / x86_target_exceptions.cpp
blob490b62441bd159ca2c8e2b4ef9cf3c530102b15f
1 // REQUIRES: x86-registered-target, staticanalyzer
3 // RUN: %clang_cc1 -fopenmp -triple x86_64-pc-linux-gnu -fopenmp-is-target-device -fcxx-exceptions -fexceptions %s -verify -Wopenmp-target-exception -analyze
4 #pragma omp declare target
5 int foo(void) {
6 int error = -1;
7 try {
8 throw 404;
10 catch (int e){
11 error = e;
13 return error;
15 #pragma omp end declare target
16 // expected-no-diagnostics