[clang] [LifetimeSafety] Trace assignment history for use-after-scope errors (PR #188467)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 29 12:53:40 PDT 2026
usx95 wrote:
> Regarding your example: `const char* x = temporary().begin()->second.data();`
> I noticed the trace starts from `temporary().begin()` rather than `temporary()`. Are we intentionally skipping `CXXOperatorCallExpr` here (I mean `temporary().begin()->`), or is there a specific reason for this starting point?
`temporary()` is already marked as the object which is being tracked in the main warning.
> `temporary().begin()->`
We can choose to have that. Mostly an oversight in the my suggestion. We can revisit it to be less verbose later if need be.
https://github.com/llvm/llvm-project/pull/188467
More information about the cfe-commits
mailing list