[PATCH] D81313: Fix handling of constinit thread_locals with a forward-declared type.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 5 16:48:32 PDT 2020


rsmith added a comment.

Your FIXME is a concern. I think it would be preferable for this function to require as a precondition that the type is complete. If the only call where that isn't true is the call from `ItaniumCXXABI::usesThreadWrapperFunction`, it seems reasonable to perform a complete-type check there before checking for trivial destructibility. When called from `Sema`, returning a conservatively-correct value here is likely to paper over bugs where a `RequireCompleteType` call is missing and a definition could be instantiated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81313





More information about the cfe-commits mailing list