[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 27 03:52:05 PST 2025
================
@@ -1505,23 +1741,51 @@ class DataInvocationGadget : public WarningGadget {
const ExplicitCastExpr *Op;
public:
- DataInvocationGadget(const MatchFinder::MatchResult &Result)
+ DataInvocationGadget(const MatchResult &Result)
: WarningGadget(Kind::DataInvocation),
- Op(Result.Nodes.getNodeAs<ExplicitCastExpr>(OpTag)) {}
+ Op(Result.getNodeAs<ExplicitCastExpr>(OpTag)) {}
static bool classof(const Gadget *G) {
return G->getKind() == Kind::DataInvocation;
}
- static Matcher matcher() {
+ static bool checkCallExpr(const CXXMemberCallExpr *call) {
----------------
ilya-biryukov wrote:
NITS:
- let's keep this function private
- let's rename to something a bit more descriptive, e.g. `isDataFunction`
https://github.com/llvm/llvm-project/pull/125492
More information about the cfe-commits
mailing list