[all-commits] [llvm/llvm-project] fe3b20: [analyzer] Use CDM::CLibrary instead of isGlobalCF...
NagyDonat via All-commits
all-commits at lists.llvm.org
Thu Apr 11 01:44:58 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fe3b20d5ab4b47823fb48ad7cfbc47b8224ce826
https://github.com/llvm/llvm-project/commit/fe3b20d5ab4b47823fb48ad7cfbc47b8224ce826
Author: NagyDonat <donat.nagy at ericsson.com>
Date: 2024-04-11 (Thu, 11 Apr 2024)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
M clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp
Log Message:
-----------
[analyzer] Use CDM::CLibrary instead of isGlobalCFunction() (#88267)
This commit updates several checkers to use call descriptions with the
matching mode `CDM::CLibrary` instead of checking
`Call.isGlobalCFunction()` after performing the match. This resolves
several TODOs in various checkers.
Note that both matching with `CDM::CLibrary` and calling
`isGlobalCFunction` leads to `CheckerContext::isCLibraryFunction()`
checks (so this change is close to being NFC), but if it is used via the
matching mode then the checker can automatically recognize the builtin
variants of the matched functions.
I'll also make similar changes in GenericTaintChecker, but that checker
has separate and inconsistent rules for handling the normal and the
builtin variant of several functions (e.g. `memcpy` and
`__builtin_memcpy`), so I'll put those changes into a separate commit.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list