1 // expected-no-diagnostics 2 3 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify %s 4 // RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device -verify %s 5 6 #include "Inputs/cuda.h" 7 8 struct S { 9 __host__ ~S() {} 10 __device__ ~S() {} 11 }; 12 13 __host__ __device__ void test() { 14 S s; 15 // This should not crash clang. 16 s.~S(); 17 } 18