]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: __has_trivial_destructor regression
authorJason Merrill <jason@redhat.com>
Mon, 2 Jun 2025 12:36:22 +0000 (08:36 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 2 Jun 2025 15:28:23 +0000 (11:28 -0400)
commit8a42538f9693a6608bb733860adec75a691f1940
treeddb81dfe4139de7517b6cbda7227827e7f723030
parent08031b88e2a32cc334af540703c5332a6b716529
c++: __has_trivial_destructor regression

We don't want the new call to get_dtor to cause function instantiation.

PR c++/107600

gcc/cp/ChangeLog:

* semantics.cc (trait_expr_value) [CPTK_HAS_TRIVIAL_DESTRUCTOR]:
Add cp_unevaluated.

gcc/testsuite/ChangeLog:

* g++.dg/ext/has_trivial_destructor-3.C: New test.
gcc/cp/semantics.cc
gcc/testsuite/g++.dg/ext/has_trivial_destructor-3.C [new file with mode: 0644]