aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/ThreadSafetyCommon.cpp
diff options
context:
space:
mode:
authorAaron Puchert <aaronpuchert@alice-dsl.net>2020-09-05 15:44:20 +0200
committerAaron Puchert <aaronpuchert@alice-dsl.net>2020-09-05 17:26:12 +0200
commit9dcc82f34ea9b623d82d2577b93aaf67d36dabd2 (patch)
treee1657b4c3ae758804aa8801cc0e115f4f5e79c1a /clang/lib/Analysis/ThreadSafetyCommon.cpp
parentac87480bd8beef0a4e93981e38df2c21652e1393 (diff)
downloadllvm-9dcc82f34ea9b623d82d2577b93aaf67d36dabd2.zip
llvm-9dcc82f34ea9b623d82d2577b93aaf67d36dabd2.tar.gz
llvm-9dcc82f34ea9b623d82d2577b93aaf67d36dabd2.tar.bz2
Thread safety analysis: Consider global variables in scope
Instead of just mutex members we also consider mutex globals. Unsurprisingly they are always in scope. Now the paper [1] says that > The scope of a class member is assumed to be its enclosing class, > while the scope of a global variable is the translation unit in > which it is defined. But I don't think we should limit this to TUs where a definition is available - a declaration is enough to acquire the mutex, and if a mutex is really limited in scope to a translation unit, it should probably be only declared there. [1] https://static.googleusercontent.com/media/research.google.com/en/us/pubs/archive/42958.pdf Fixes PR46354. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D84604
Diffstat (limited to 'clang/lib/Analysis/ThreadSafetyCommon.cpp')
0 files changed, 0 insertions, 0 deletions