aboutsummaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/x86_target_try_catch.cpp
blob: 9335f1514d209c7b79117f377628753f0f243715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// REQUIRES: x86-registered-target, staticanalyzer

// RUN: %clang_cc1 -fopenmp -triple x86_64-pc-linux-gnu -fopenmp-is-target-device -fcxx-exceptions -fexceptions %s -emit-llvm -verify -Wopenmp-target-exception -analyze
#pragma omp declare target
int foo(void) {
	int error = -1;
	try {
		error = 1;
	}
	catch (int e){ 
		error = e;
	}
	return error;
}
#pragma omp end declare target
// expected-no-diagnostics