[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 30 21:49:15 PDT 2025
================
@@ -1341,6 +1341,14 @@ checkExprLifetimeImpl(Sema &SemaRef, const InitializedEntity *InitEntity,
}
if (IsGslPtrValueFromGslTempOwner && DiagLoc.isValid()) {
+
+ if (SemaRef.getLangOpts().CPlusPlus23) {
----------------
yronglin wrote:
Only update this test seems make sense.
https://github.com/llvm/llvm-project/pull/145164
More information about the cfe-commits
mailing list