clang-tools 22.0.0git
clang::tidy::bugprone::UnsafeFunctionsCheck Class Reference

Checks for functions that have safer, more secure replacements available, or are considered deprecated due to design flaws. More...

#include <UnsafeFunctionsCheck.h>

Inheritance diagram for clang::tidy::bugprone::UnsafeFunctionsCheck:
[legend]

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ UnsafeFunctionsCheck()

Member Function Documentation

◆ check()

◆ onEndOfTranslationUnit()

void clang::tidy::bugprone::UnsafeFunctionsCheck::onEndOfTranslationUnit ( )
override

Definition at line 357 of file UnsafeFunctionsCheck.cpp.

◆ registerMatchers()

◆ registerPPCallbacks()

void clang::tidy::bugprone::UnsafeFunctionsCheck::registerPPCallbacks ( const SourceManager & SM,
Preprocessor * PP,
Preprocessor * ModuleExpanderPP )
override

Definition at line 351 of file UnsafeFunctionsCheck.cpp.

◆ storeOptions()


The documentation for this class was generated from the following files: