[PATCH] D76943: [clang analysis] Make mutex guard detection more reliable.
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 27 16:33:28 PDT 2020
aaronpuchert added subscribers: aaron.ballman, aaronpuchert.
aaronpuchert added inline comments.
================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:2144-2145
+ if (auto *CE = dyn_cast<CastExpr>(E))
+ if (CE->getCastKind() == CK_NoOp ||
+ CE->getCastKind() == CK_ConstructorConversion)
+ E = CE->getSubExpr()->IgnoreParens();
----------------
rsmith wrote:
> Should we also skip over `CK_UserDefinedConversion` here (for conversion functions that return mutex locks, I suppose)?
Seems reasonable, there could be a CXXMemberCallExpr to an annotated function below that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76943/new/
https://reviews.llvm.org/D76943
More information about the cfe-commits
mailing list