[clang] [LifetimeSafety] Treat std::unique_ptr::release() as a move operation (PR #180230)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 6 11:51:52 PST 2026


https://github.com/Xazax-hun commented:

Overall looks great, some nits inline.

I think it might make sense to have a general facility at some point that matches on some APIs (like methods) and replaces the API calls with a sequence of hard coded facts.

This is a way to hard code summaries. The static analyzer already has some convenience facilities to match APIs. I am wondering if those could be reused.

That being said, I think we can wait with all that until we see multiple functions being directly modeled in this analysis. So far, only for `release` these generalizations might not carry their weight. 

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


More information about the cfe-commits mailing list