[clang] [LifetimeSafety] Catch intra-method lifetime_capture_by(this) dangles (PR #204630)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 01:17:19 PDT 2026


https://github.com/NeKon69 commented:

This new escape fact seems somewhat different from the existing return/field/global escape kinds. I wonder if that is intentional. For example, it doesn't go into `NoescapeWarningsMap` like other escape kinds, and it also seems to bypass some of the machinery those facts do go through.

Also, One thing I got confused by is the naming: as far as I understand, this new fact is emitted every time there's an implicit `this` origin, which doesn't necessarily mean there's an escape through capture. But I guess we already follow a similar exit-block pattern with `GlobalEscapeFact` and `FieldEscapeFact`, so it might just be me finding this weird... Maybe there are some later constraints in the code that make the fact name more precise...

https://github.com/llvm/llvm-project/pull/204630


More information about the cfe-commits mailing list