[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)
Stephen Tozer via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 4 06:35:08 PDT 2024
SLTozer wrote:
> The release note doesn't say: Does `-fextend-lifetimes` imply `-fextend-this-pointer`? They're implemented as independent toggles but the effect isn't really independent IIRC. I wonder (years after it was originally implemented downstream, I know) whether we'd be better off with `-fextend-lifetimes[={all,this,none}]`. (But maybe wait for a second opinion.)
Correct, this is _sort of_ implied by `-fextend-lifetimes` extending the life of all variables and `-fextend-this-pointer` extending just the `this` pointer, but it wasn't totally clear to me the first time I looked at the flag either. Making it into a flag that takes options is an interesting idea and one I broadly approve of - especially as I have some plans to add additional modes (e.g. `-fextend-lifetimes=params`) further down the line.
https://github.com/llvm/llvm-project/pull/110000
More information about the cfe-commits
mailing list