================ @@ -826,6 +842,14 @@ void CXXRecordDecl::addedMember(Decl *D) { ? !Constructor->isImplicit() : (Constructor->isUserProvided() || Constructor->isExplicit())) data().Aggregate = false; + + // A trivially relocatable class is a class: + // -- where no eligible copy constructor, move constructor, copy + // assignment operator, move assignment operator, or destructor is + // user-provided, + if (Constructor->isUserProvided() && (Constructor->isCopyConstructor() || + Constructor->isMoveConstructor())) + data().IsNaturallyTriviallyRelocatable = false; ---------------- cor3ntin wrote:
Consider, for example ``` template <typename T> struct S { S(const S&) = default; S(const S&) requires false = delete; }; ``` https://compiler-explorer.com/z/5s5rja6d3 https://github.com/llvm/llvm-project/pull/84621 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits