[all-commits] [llvm/llvm-project] 37e99d: [ThreadSafety] Add two-state semantics for handleC...
Ziqing Luo via All-commits
all-commits at lists.llvm.org
Thu Jul 16 18:12:38 PDT 2026
Branch: refs/heads/users/ziqingluo/PR-171209196
Home: https://github.com/llvm/llvm-project
Commit: 37e99d2d7669df9fa1fb6b79166147ed00d2c8f0
https://github.com/llvm/llvm-project/commit/37e99d2d7669df9fa1fb6b79166147ed00d2c8f0
Author: Ziqing Luo <ziqing_luo at apple.com>
Date: 2026-07-16 (Thu, 16 Jul 2026)
Changed paths:
M clang/lib/Analysis/ThreadSafety.cpp
M clang/test/SemaCXX/warn-thread-safety-analysis.cpp
Log Message:
-----------
[ThreadSafety] Add two-state semantics for handleCall in beta mode
Previous contributions added alias analysis and strengthened soundness by
invalidating out-parameters in beta mode. The latter feature introduced a
distinction between the contexts before and after a function call, because the
invalidation assumes that an argument passed by pointer or reference may be
changed by the function.
This requires two-state semantics for handling function attributes.
Specifically, AcquireCapability and AssertCapability, which both ensure that
some locks are held after the call, should be associated with the post-state.
Other function attributes, like RequireCapability or ReleaseCapability, are
associated with the pre-state.
This commit implements these semantics. This change only affects beta mode.
A previous discussion about these semantics:
https://github.com/llvm/llvm-project/pull/190154
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list