[clang] Moves destructor type-trait deduction to a public function (PR #238456)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 01:23:22 PST 2026
cor3ntin wrote:
> For example, we may need to call EvaluateUnaryTypeTrait twice, in order to determine what type of destruction a C++ type has. The first call would check if the type is trivially-destructible. If so, destruction is a no-op. We'd need to call the function a second time if it returns false, because we don't yet know that the type is destructible. All of that information was derived in the first call, but it gets discarded, and so the toolchain would need to do twice as much work :(
This is probably reasonable?
Your proposed change does lookup twice, which afaik is going to be the most expensive bit of the operation anyway?
https://github.com/llvm/llvm-project/pull/238456
More information about the cfe-commits
mailing list