rsmith added inline comments.
================ Comment at: lib/Sema/SemaType.cpp:8022 + else if (LangOpts.CPlusPlus && isCompleteType(Loc, T) && + !T.isTriviallyCopyableType(Context)) // Some other non-trivially-copyable type (probably a C++ class) ---------------- efriedma wrote: > If you're going to allow incomplete types in C++, you'll need some code to > handle the case where the type is initially incomplete, but completed later. Perhaps the trivially-copyable requirement could be deferred in all cases until we reach an actual load or store. Constraints that are only enforced when a type happens to be complete are generally a bad idea (we have a mess like this for constraints on types being non-abstract, and we're still working on unsticking ourselves from that mess in the C++ standard). In passing, I'd also note that we need the trivially-copyable requirement even outside C++, for structs containing `__weak` / `__strong` fields. https://reviews.llvm.org/D46112 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits