[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 7 11:45:39 PDT 2024
================
@@ -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);
----------------
cor3ntin wrote:
I have the same question!
In particular in the test change, I think the expression _is_ rewritten.
https://github.com/llvm/llvm-project/pull/99748
More information about the cfe-commits
mailing list