[clang] [Clang] No longer require complete types with __builtin_launder (PR #91070)

via cfe-commits cfe-commits at lists.llvm.org
Fri May 10 05:32:18 PDT 2024


cor3ntin wrote:

The committee says so

Because launder is just adding a fence on a pointer to T, we need not know what T is.

I don't know whether there are scenarios where calling launder on an incomplete type would be useful (as presumably you would new an object right before which would require completeness) but it's also harmless.

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


More information about the cfe-commits mailing list