ojhunt wrote:

> Hey @ojhunt Same issue also happens in C++23, not just C++17 — the error only 
> kicks in at C++26 on current trunk. I tried to cover all three modes and 
> confirm clean codegen (calls @_ZdlPv, no assert). Let me know if there is 
> some improvisation required here.

Hmmmm.

Ok, I think I remember now the reason I thought we could just gate on 
incomplete types.

I think first pass of this should not be target version gated. We track the 
existence of type aware allocation functions, so basic defensive level should 
be:

1. The allocation lookup comes in requesting a type aware allocator
2. If the type is incomplete produce a warning, and drop the type aware request 
part of the requested IAP.

That's fairly conservative, but we could go a step further: if template 
deduction can bind a type aware allocation function to the (incomplete) 
allocation type we upgrade to an error. But I'll need to look into whether that 
change would still be in the "good first function" family

https://github.com/llvm/llvm-project/pull/213455
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to