[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 7 06:23:58 PDT 2025
hokein wrote:
> I have debug the issue, seems we cannot move the __range variable check to the start of checkExprLifetimeImpl, we may missing extending lifetime of temporaries.
Ah, that makes sense -- I missed the fact that this part of the code is also responsible for extending the object’s lifetime. Thanks a lot for looking into this and clarifying it.
https://github.com/llvm/llvm-project/pull/145164
More information about the cfe-commits
mailing list