[clang] Moves destructor type-trait deduction to a public function (PR #238456)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 3 11:52:30 PST 2026


https://github.com/cor3ntin commented:

I think i'd like to know more about the motivation.
We want to keep the implementation very close to the type traits implementation - ie. this is a 1/1 mapping to `<type_traits>` - I'm not certain than avoiding the duplication is desirable.

In particular, this uses Sema because access checks are done in the context where the trait is used, which, afaik, is why we need Sema and do lookup.
If we could not do that, you'd be able to skip all of that.

Can C++ befriend carbon types? Presumably that would be one scenario where this matter.

https://github.com/llvm/llvm-project/pull/238456


More information about the cfe-commits mailing list