1 // RUN: %clang_cc1 -fsyntax-only -verify -fexceptions %s
2 // expected-no-diagnostics
4 #include "Inputs/cuda.h"
6 __device__ void operator delete(void *p) {}
25 // The constructor of B calls the delete operator to clean up
26 // the memory allocated by the new operator when exceptions happen.
27 // Make sure that there are no diagnostics due to the device delete
30 // No need to do similar checks on the device side since it does
31 // not support exception.
33 shared_ptr<A> pa{new A};