mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-27 20:38:07 +02:00
Merge bitcoin/bitcoin#32647: build: add -Wthread-safety-pointer
83bfe1485c
build: add -Wthread-safety-pointer (fanquake)240a4fb95d
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 ACK83bfe1485c
maflcko: lgtm ACK83bfe1485c
theuni: utACK83bfe1485c
Tree-SHA512: 9bc80bd04a9cebed8aca20bc23a17e52a6a89a1fb042993322f43dbf7bd93de509c091ebb69255063833b098ab11a64285eccf61e17b9f94f974c734a20ad8da
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user