aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
diff options
context:
space:
mode:
authorBalazs Benics <balazs.benics@sigmatechnology.se>2021-11-19 18:32:13 +0100
committerBalazs Benics <balazs.benics@sigmatechnology.se>2021-11-19 18:32:13 +0100
commitf18da190b0dba817d33ccd7727537f12304d8125 (patch)
tree0a1d592eff9c3d357b07125ed63f92fe77f32612 /clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
parent6c512703a9e6e495afa0f44528821c27f28db795 (diff)
downloadllvm-f18da190b0dba817d33ccd7727537f12304d8125.zip
llvm-f18da190b0dba817d33ccd7727537f12304d8125.tar.gz
llvm-f18da190b0dba817d33ccd7727537f12304d8125.tar.bz2
[analyzer][NFC] Switch to using CallDescription::matches() instead of isCalled()
This patch replaces each use of the previous API with the new one. In variadic cases, it will use the ADL `matchesAny(Call, CDs...)` variadic function. Also simplifies some code involving such operations. Reviewed By: martong, xazax.hun Differential Revision: https://reviews.llvm.org/D113591
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
index 1aaaf0f..1de5d72 100644
--- a/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
@@ -120,7 +120,7 @@ void SimpleStreamChecker::checkPostCall(const CallEvent &Call,
if (!Call.isGlobalCFunction())
return;
- if (!Call.isCalled(OpenFn))
+ if (!OpenFn.matches(Call))
return;
// Get the symbolic value corresponding to the file handle.
@@ -139,7 +139,7 @@ void SimpleStreamChecker::checkPreCall(const CallEvent &Call,
if (!Call.isGlobalCFunction())
return;
- if (!Call.isCalled(CloseFn))
+ if (!CloseFn.matches(Call))
return;
// Get the symbolic value corresponding to the file handle.