]> granicus.if.org Git - clang/commit
Thread safety analysis: Handle conditional expression in getTrylockCallExpr
authorAaron Puchert <aaronpuchert@alice-dsl.net>
Sat, 6 Oct 2018 01:09:28 +0000 (01:09 +0000)
committerAaron Puchert <aaronpuchert@alice-dsl.net>
Sat, 6 Oct 2018 01:09:28 +0000 (01:09 +0000)
commit7cda4756fc9713d98fd3513b8df172700f267bad
treecad3d8549e5e7469c7764487c8c71acce1cdf171
parent339ff47af8084b99b9968f078e66f62d6adfafab
Thread safety analysis: Handle conditional expression in getTrylockCallExpr

Summary:
We unwrap conditional expressions containing try-lock functions.

Additionally we don't acquire on conditional expression branches, since
that is usually not helpful. When joining the branches we would almost
certainly get a warning then.

Hopefully fixes an issue that was raised in D52398.

Reviewers: aaron.ballman, delesley, hokein

Reviewed By: aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D52888

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343902 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ThreadSafety.cpp
test/SemaCXX/warn-thread-safety-analysis.cpp