[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)
Malek Ben Slimane via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 29 07:50:01 PST 2024
================
@@ -1915,6 +1936,101 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D,
}
}
+ std::optional<CallExpr::const_arg_range> Args;
+ if (Exp) {
+ if (const auto *CE = dyn_cast<CallExpr>(Exp))
+ Args = CE->arguments();
+ else if (const auto *CE = dyn_cast<CXXConstructExpr>(Exp))
+ Args = CE->arguments();
+ else
+ llvm_unreachable("Unknown call kind");
----------------
malek203 wrote:
`CXXMemberCallExpr` inherits from `CallExpr`, so it is already covered.
https://github.com/llvm/llvm-project/pull/110523
More information about the cfe-commits
mailing list