[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Headers / target_include_new.cpp
blob108509e249000a39548f33b5114b44e680ef7fee
1 // RUN: %clang_cc1 -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/Inputs/include -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64 -emit-llvm-bc %s -o %t-ppc-host.bc
2 // RUN: %clang_cc1 -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/Inputs/include -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64 -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s
3 // expected-no-diagnostics
5 // Ensure we make `_ZdlPv`, aka. `operator delete(void*)` available without the need to `include <new>`.
7 // CHECK: define {{.*}}_ZdlPv
9 #ifndef HEADER
10 #define HEADER
12 class Base {
13 public:
14 virtual ~Base() = default;
17 class Derived : public Base {
18 public:
19 #pragma omp declare target
20 Derived();
21 #pragma omp end declare target
24 Derived::Derived() { }
26 int main(void) {
27 #pragma omp target
30 return 0;
32 #endif