================ @@ -3092,30 +3092,65 @@ bool FunctionDecl::isVariadic() const { return false; } -FunctionDecl::DefaultedFunctionInfo * -FunctionDecl::DefaultedFunctionInfo::Create(ASTContext &Context, - ArrayRef<DeclAccessPair> Lookups) { - DefaultedFunctionInfo *Info = new (Context.Allocate( - totalSizeToAlloc<DeclAccessPair>(Lookups.size()), - std::max(alignof(DefaultedFunctionInfo), alignof(DeclAccessPair)))) - DefaultedFunctionInfo; +FunctionDecl::DefaultedOrDeletedFunctionInfo * +FunctionDecl::DefaultedOrDeletedFunctionInfo::Create( + ASTContext &Context, ArrayRef<DeclAccessPair> Lookups, + StringLiteral *DeletedMessage) { + static constexpr size_t Alignment = + std::max({alignof(DefaultedOrDeletedFunctionInfo), + alignof(DeclAccessPair), alignof(StringLiteral *)}); + size_t Size = totalSizeToAlloc<DeclAccessPair, StringLiteral *>( + Lookups.size(), !!DeletedMessage); ---------------- erichkeane wrote:
```suggestion Lookups.size(), DeletedMessage != nullptr); ``` https://github.com/llvm/llvm-project/pull/86526 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits