================ @@ -2539,6 +2539,12 @@ StmtResult Sema::ActOnCXXForRangeStmt(Scope *S, SourceLocation ForLoc, return StmtError(); } + if (getLangOpts().CPlusPlus23) { + auto Entity = InitializedEntity::InitializeVariable(RangeVar); ---------------- AaronBallman wrote:
Ah `InitializedEntity` doesn't have a copy constructor so the move operation will be cheap. Thanks! https://github.com/llvm/llvm-project/pull/76361 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits