1 // RUN: %clang_cc1 -std=c++17 -O0 %s -emit-llvm -o /dev/null -verify -triple %itanium_abi_triple
2 // RUN: %clang_cc1 -std=c++17 -O0 %s -emit-llvm -o /dev/null -verify -triple %ms_abi_triple
4 // Minimal reproducer for PR42665.
5 // expected-no-diagnostics
9 virtual ~Foo() = default;
12 template <typename Deleter
>
18 template <typename Deleter
>
19 Pair(Foo
, Deleter
) -> Pair
<Deleter
>;
22 void deleter(T
& t
) { t
.~T(); }
25 return Pair
{ Foo(), deleter
<Foo
> };
32 d(f
); // Invoke virtual destructor of Foo through d.
33 } // p's destructor is invoked.