aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/Syntax/TreeTest.cpp
diff options
context:
space:
mode:
authorAaron Puchert <aaron.puchert@sap.com>2020-06-08 16:29:53 +0200
committerAaron Puchert <aaron.puchert@sap.com>2020-06-08 17:00:29 +0200
commit1850f56c8abae637c2cc1b8d27b8577c5700101a (patch)
treeda436aa88ba1989f91783225fb2ddefa79179df4 /clang/unittests/Tooling/Syntax/TreeTest.cpp
parent31eeee1d8e0d57465a696bb56b9bb67445c8c667 (diff)
downloadllvm-1850f56c8abae637c2cc1b8d27b8577c5700101a.zip
llvm-1850f56c8abae637c2cc1b8d27b8577c5700101a.tar.gz
llvm-1850f56c8abae637c2cc1b8d27b8577c5700101a.tar.bz2
Thread safety analysis: Support deferring locks
Summary: The standard std::unique_lock can be constructed to manage a lock without initially acquiring it by passing std::defer_lock as second parameter. It can be acquired later by calling lock(). To support this, we use the locks_excluded attribute. This might seem like an odd choice at first, but its consistent with the other annotations we support on scoped capability constructors. By excluding the lock we state that it is currently not in use and the function doesn't change that, which is exactly what the constructor does. Along the way we slightly simplify handling of scoped capabilities. Reviewers: aaron.ballman, delesley Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D81332
Diffstat (limited to 'clang/unittests/Tooling/Syntax/TreeTest.cpp')
0 files changed, 0 insertions, 0 deletions