[PATCH] D76943: [clang analysis] Make mutex guard detection more reliable.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 27 13:43:18 PDT 2020
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
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();
----------------
Should we also skip over `CK_UserDefinedConversion` here (for conversion functions that return mutex locks, I suppose)?
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