================ @@ -1013,15 +1013,15 @@ CXXDefaultArgExpr *CXXDefaultArgExpr::CreateEmpty(const ASTContext &C, return new (Mem) CXXDefaultArgExpr(EmptyShell(), HasRewrittenInit); } -CXXDefaultArgExpr *CXXDefaultArgExpr::Create(const ASTContext &C, - SourceLocation Loc, - ParmVarDecl *Param, - Expr *RewrittenExpr, - DeclContext *UsedContext) { +CXXDefaultArgExpr * +CXXDefaultArgExpr::Create(const ASTContext &C, SourceLocation Loc, + ParmVarDecl *Param, DeclContext *UsedContext, + Expr *RewrittenExpr, bool HasRewrittenInit) { size_t Size = totalSizeToAlloc<Expr *>(RewrittenExpr != nullptr); ---------------- Sirraide wrote:
Maybe the naming here is just weird, but is there ever a case where `RewrittenExpr != nullptr` and `HasRewrittenInit` *don’t* evaluated to the same value? Because in that case, either `HasRewrittenInit` seems superfluous or `RewrittenExpr` is badly named, because a ‘non-rewritten `RewrittenExpr`’ sounds a bit nonsensical... https://github.com/llvm/llvm-project/pull/99748 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits