Nikita Popov 0969e2c420
[CaptureTracking] Fix handling for non-returning read-only calls (#158979)
We currently infer `captures(none)` for calls that are read-only,
nounwind and willreturn. As pointed out in
https://github.com/llvm/llvm-project/issues/129090, this is not correct
even with this set of pre-conditions, because the function could
conditionally cause UB depending on the address.

As such, change this logic to instead report `captures(address)`. This
also allows dropping the nounwind and willreturn checks, as these can
also only capture the address.
2025-09-17 11:27:06 +02:00
..