[clang] [analyzer] Add aggregate value tracking to the LifetimeModeling checker (PR #214823)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 03:33:46 PDT 2026


Xazax-hun wrote:

>  Based on this example I think I should also play around with it more and see how the checker behaves on them then add them to the test file and in case of a FP provide FIXME for it.

I agree, before we merge I think it would be better to have some more test coverage to better understand what needs to be done and to see if there is an alternative solution. Some examples I can think of:
* Tests both with trivial/non-trivial types (distinction is whether they have user-provided dtor)
* Copying/assigning/moving these types around
* Types with both owned and view pointers inside them
* When only the input is an aggregate, when only the output is an aggregate, when both are aggregates
* Calling methods on dangling/non-dangling aggregates
* When there are multiple temporaries involved, e.g., simulating the conversion operator between a std::string and a string_view
* Lifetime dependency in the implicit this position 

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


More information about the cfe-commits mailing list