[PATCH] D52888: Thread safety analysis: Handle conditional expression in getTrylockCallExpr
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 4 14:34:25 PDT 2018
aaronpuchert added a comment.
Additional branches (with non-tail recursion unfortunately) would allow the following to work:
void foo16() {
if (cond ? mu.TryLock() : false)
mu.Unlock();
}
void foo17() {
if (cond ? true : !mu.TryLock())
return;
mu.Unlock();
}
Worth the effort, or is that too exotic?
Repository:
rC Clang
https://reviews.llvm.org/D52888
More information about the cfe-commits
mailing list