[clang] [clang][ThreadSafety] Warn when constructor is trylock (PR #95290)
Dan McArdle via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 17 16:53:32 PDT 2024
================
@@ -3657,8 +3657,8 @@ class Foo {
int a GUARDED_BY(mu_);
bool c;
- int tryLockMutexI() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu_);
- Mutex* tryLockMutexP() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu_);
+ bool tryLockMutexI() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu_);
----------------
dmcardle wrote:
This bool can stay int if we go with the permissive bool/int/pointer return values.
https://github.com/llvm/llvm-project/pull/95290
More information about the cfe-commits
mailing list