[PATCH] D84604: Thread safety analysis: Consider global variables in scope
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 3 06:17:11 PDT 2020
aaron.ballman added inline comments.
================
Comment at: clang/test/SemaCXX/warn-thread-safety-negative.cpp:87
+Mutex globalMutex;
+void f() EXCLUSIVE_LOCKS_REQUIRED(!globalMutex);
+
----------------
Can you add a test that uses `!::globalMutex`? I'd like to verify that lookup rules are honored for naming the mutex, so more complex examples with name hiding would also be useful.
================
Comment at: clang/test/SemaCXX/warn-thread-safety-negative.cpp:91
+ Mutex namespaceMutex;
+ void f() EXCLUSIVE_LOCKS_REQUIRED(!namespaceMutex);
+}
----------------
Can you also add a test that uses `!ns::namespaceMutex`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84604/new/
https://reviews.llvm.org/D84604
More information about the cfe-commits
mailing list