rsandifo-arm added a comment.

In D76088#1920241 <https://reviews.llvm.org/D76088#1920241>, @efriedma wrote:

> We already have a special case for void* here; it's trivial to extend that to 
> also check for sizeless types. I don't want to add weird semantic 
> restrictions just to save a few characters in the compiler.


OK, I've done that in v2.  It didn't feel right to add a `Ty->isSizelessType()` 
check alongside the existing `Ty->isVoidType()` check because sizelessness is 
IMO logically orthogonal to whether we have a fully fleshed-out definition or 
not.  E.g. an earlier version of the extension allowed sizeless structures, and 
although they are no longer supported, the principle still holds that forward 
declarations of sizeless types make just as much conceptual sense as forward 
declarations of sized types.  We'd then want to treat pointers to 
incompletely-defined sizeless types in the same as pointers to 
incompletely-defined sized types.  The patch therefore checks for a sizeless 
type after `RequireCompleteType` instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76088/new/

https://reviews.llvm.org/D76088



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to