[clang] [clang] Avoid triggering vtable instantiation for C++23 constexpr dtor (PR #102605)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 9 07:06:06 PDT 2024
================
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+template <typename T> static void destroy() {
+ T t;
+ ++t;
+}
+
+struct Incomplete;
+
+template <typename = int> struct HasD {
+ ~HasD() { destroy<Incomplete*>(); }
+};
+
+struct HasVT {
+ virtual ~HasVT();
+};
+
+struct S : HasVT {
+ HasD<> v;
+};
+
----------------
Fznamznon wrote:
I don't think there NO tests checking that complain?
https://github.com/llvm/llvm-project/pull/102605
More information about the cfe-commits
mailing list