mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-12 16:41:46 +00:00
Merge bitcoin/bitcoin#32647: build: add -Wthread-safety-pointer
83bfe1485c37d407de7eed11b8ad769a05f78b66 build: add -Wthread-safety-pointer (fanquake)
240a4fb95d5b843826081807019cd405aa654e2b Squashed 'src/leveldb/' changes from 113db4962b..aba469ad6a (fanquake)
Pull request description:
This will become available in Clang 21:
> ThreadSafetyAnalysis now supports -Wthread-safety-pointer, which
> enables warning on passing or returning pointers to guarded variables
> as function arguments or return value respectively. Note that
> ThreadSafetyAnalysis still does not perform alias analysis. The
> feature will be default-enabled with -Wthread-safety in a future release.
See https://github.com/llvm/llvm-project/blob/main/clang/docs/ReleaseNotes.rst.
Also updates the leveldb subtree to pull: https://github.com/bitcoin-core/leveldb-subtree/pull/54.
ACKs for top commit:
davidgumberg:
Tested ACK 83bfe1485c
maflcko:
lgtm ACK 83bfe1485c37d407de7eed11b8ad769a05f78b66
theuni:
utACK 83bfe1485c37d407de7eed11b8ad769a05f78b66
Tree-SHA512: 9bc80bd04a9cebed8aca20bc23a17e52a6a89a1fb042993322f43dbf7bd93de509c091ebb69255063833b098ab11a64285eccf61e17b9f94f974c734a20ad8da
This commit is contained in:
commit
4af72d8b08
@ -443,6 +443,7 @@ else()
|
||||
try_append_cxx_flags("-Wvla" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wshadow-field" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wthread-safety" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wthread-safety-pointer" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wloop-analysis" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wredundant-decls" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wunused-member-function" TARGET warn_interface SKIP_LINK)
|
||||
|
||||
@ -171,8 +171,8 @@ class LRUCache {
|
||||
private:
|
||||
void LRU_Remove(LRUHandle* e);
|
||||
void LRU_Append(LRUHandle* list, LRUHandle* e);
|
||||
void Ref(LRUHandle* e);
|
||||
void Unref(LRUHandle* e);
|
||||
void Ref(LRUHandle* e) EXCLUSIVE_LOCKS_REQUIRED(mutex_);
|
||||
void Unref(LRUHandle* e) EXCLUSIVE_LOCKS_REQUIRED(mutex_);
|
||||
bool FinishErase(LRUHandle* e) EXCLUSIVE_LOCKS_REQUIRED(mutex_);
|
||||
|
||||
// Initialized before use.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user