================
@@ -2539,6 +2539,12 @@ StmtResult Sema::ActOnCXXForRangeStmt(Scope *S,
SourceLocation ForLoc,
return StmtError();
}
+ if (getLangOpts().CPlusPlus23) {
+ auto Entity = InitializedEntity::InitializeVariable(RangeVar);
----------------
yronglin wrote:
I use`InitializedEntity ` instead of auto,
`InitializedEntity::InitializeVariable` returns a rvalue, so I haven't add a
const ref.
https://github.com/llvm/llvm-project/pull/76361
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits