[PATCH] D76088: [Sema][SVE] Don't allow sizeless objects to be thrown
Richard Sandiford via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 12 15:12:15 PDT 2020
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
More information about the cfe-commits
mailing list