[all-commits] [llvm/llvm-project] e64ef6: Thread Safety Analysis: Differentiate between lock...
Malek Ben Slimane via All-commits
all-commits at lists.llvm.org
Wed Sep 4 07:18:34 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e64ef634bbd940dfaae23d9fb43e6385014ffd10
https://github.com/llvm/llvm-project/commit/e64ef634bbd940dfaae23d9fb43e6385014ffd10
Author: Malek Ben Slimane <85631834+malek203 at users.noreply.github.com>
Date: 2024-09-04 (Wed, 04 Sep 2024)
Changed paths:
M clang/lib/Analysis/ThreadSafety.cpp
M clang/test/SemaCXX/warn-thread-safety-analysis.cpp
Log Message:
-----------
Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (#105526)
This fixes false positives related to returning a scoped lockable
object. At the end of a function, we check managed locks instead of
scoped locks.
At real join points, we skip checking managed locks because we assume
that the scope keeps track of its underlying mutexes and will release
them at its destruction. So, checking for the scopes is sufficient.
However, at the end of a function, we aim at comparing the expected and
the actual lock sets. There, we skip checking scoped locks to prevent to
get duplicate warnings for the same lock.
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