[analyzer][NFC] Introduce CallDescription::matches() in addition to isCalled()
authorBalazs Benics <balazs.benics@sigmatechnology.se>
Fri, 19 Nov 2021 17:32:13 +0000 (18:32 +0100)
committerBalazs Benics <balazs.benics@sigmatechnology.se>
Fri, 19 Nov 2021 17:32:13 +0000 (18:32 +0100)
commit6c512703a9e6e495afa0f44528821c27f28db795
tree1ce9c3d6036dd50c6b30e7787747947eca58c1f9
parentd448fcd9b2238377dd8832ce9e35a37b59ef5aeb
[analyzer][NFC] Introduce CallDescription::matches() in addition to isCalled()

This patch introduces `CallDescription::matches()` member function,
accepting a `CallEvent`.
Semantically, `Call.isCalled(CD)` is the same as `CD.matches(Call)`.

The patch also introduces the `matchesAny()` variadic free function template.
It accepts a `CallEvent` and at least one `CallDescription` to match
against.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D113590
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h
clang/lib/StaticAnalyzer/Core/CallDescription.cpp
clang/lib/StaticAnalyzer/Core/CallEvent.cpp