mrcvtl wrote:

> > but why can’t we use InLifetimeExtendingContext flag here?
> > Is there a subtle difference I’m missing?
> 
> This flag will tiger subroutines to collect `MaterializedTemporaryExpr` and 
> rebuild default init/arg。 All we need to know here is that `ExtendingDecl` is 
> a C++ `__range` var in for-range-loop, so I think we should introduce a new 
> flag in VarDecl. We may need to also modify handling of VarDecl in ASTWriter 
> and ASTReader to ensure that the AST serialization is correct. WDYT?

Agreed.

My last commit should implement this. Let me know if something is wrong! 

https://github.com/llvm/llvm-project/pull/145164
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to