[llvm-branch-commits] [clang] Thread Safety Analysis: Track try-acquired capabilities as a ternary try-held state (PR #220635)

Aaron Puchert via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Nov 15 16:22:48 PST 2026


aaronpuchert wrote:

> That design seems like it would handle the re-branch, but would be forced before that to warn at the point where the analysis had rejoined the must-held and not-held branches of the ternary operator, since that join would not know anymore that the must-held and not-held are simply the split halves of the try-held.

I don't see why you couldn't track whether a held lock is a proven try-acquired capability and thus merge it with the disproven try-acquired capability as conditionally held. You could have multiple try-acquires active and would probably need to track them separately, but fundamentally you have the pieces in places.

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


More information about the llvm-branch-commits mailing list