[clang] [analyzer][NFC] Compute callee properties once per CallDescriptionMap lookup (PR #245630)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 24 08:46:41 PST 2026
================
@@ -47,24 +47,55 @@ ento::CallDescription::CallDescription(Mode MatchAs,
[](StringRef From) { return From.str(); });
}
-bool ento::CallDescription::matches(const CallEvent &Call) const {
+ento::CallDescription::Callee::Callee(const CallEvent &Call) {
// FIXME: Add ObjC Message support.
if (Call.getKind() == CE_ObjCMessage)
- return false;
+ return;
- const auto *FD = dyn_cast_or_null<FunctionDecl>(Call.getDecl());
+ FD = dyn_cast_or_null<FunctionDecl>(Call.getDecl());
if (!FD)
- return false;
+ return;
- return matchesImpl(FD, Call.getNumArgs(), Call.parameters().size());
+ ArgCount = Call.getNumArgs();
+ // Same as Call.parameters().size() for calls of FunctionDecls.
----------------
steakhal wrote:
I didn't find this comment useful.
```suggestion
```
https://github.com/llvm/llvm-project/pull/245630
More information about the cfe-commits
mailing list