|
clang-tools 22.0.0git
|
Checks for functions that have safer, more secure replacements available, or are considered deprecated due to design flaws. More...
#include <UnsafeFunctionsCheck.h>
Classes | |
| struct | CheckedFunction |
Public Member Functions | |
| UnsafeFunctionsCheck (StringRef Name, ClangTidyContext *Context) | |
| void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
| void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
| void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
| void | registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override |
| void | onEndOfTranslationUnit () override |
Checks for functions that have safer, more secure replacements available, or are considered deprecated due to design flaws.
This check relies heavily on, but is not exclusive to, the functions from the Annex K. "Bounds-checking interfaces" of C11.
https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unsafe-functions.html
Definition at line 24 of file UnsafeFunctionsCheck.h.
| clang::tidy::bugprone::UnsafeFunctionsCheck::UnsafeFunctionsCheck | ( | StringRef | Name, |
| ClangTidyContext * | Context ) |
|
override |
Definition at line 266 of file UnsafeFunctionsCheck.cpp.
References clang::tidy::bugprone::AdditionalFunctionNamesId, clang::tidy::bugprone::CustomFunctionNamesId, clang::tidy::bugprone::DeclRefId, FuncDecl, clang::tidy::bugprone::FunctionNamesId, clang::tidy::bugprone::FunctionNamesWithAnnexKReplacementId, clang::tidy::bugprone::getAnnexKReplacementFor(), clang::tidy::bugprone::getRationaleFor(), clang::tidy::bugprone::getReplacementFor(), clang::tidy::bugprone::getReplacementForAdditional(), and clang::tidy::bugprone::isAnnexKAvailable().
|
override |
Definition at line 361 of file UnsafeFunctionsCheck.cpp.
|
override |
Definition at line 199 of file UnsafeFunctionsCheck.cpp.
References clang::tidy::bugprone::AdditionalFunctionNamesId, clang::tidy::bugprone::CustomFunctionNamesId, clang::tidy::bugprone::DeclRefId, clang::tidy::bugprone::FunctionNamesId, clang::tidy::bugprone::FunctionNamesWithAnnexKReplacementId, and clang::tidy::matchers::matchesAnyListedName().
|
override |
Definition at line 355 of file UnsafeFunctionsCheck.cpp.
|
override |