clang 23.0.0git
libc_func_matchers Namespace Reference

Functions

static StringRef matchLibcName (StringRef Name)
static StringRef matchLibcNameOrBuiltinChk (StringRef Name)
static StringRef matchName (StringRef FunName, bool isBuiltin)
static bool hasUnsafeFormatOrSArg (ASTContext &Ctx, const CallExpr *Call, const Expr *&UnsafeArg, const unsigned FmtIdx, std::optional< const unsigned > FmtArgIdx=std::nullopt, bool isKprintf=false)
static bool isPredefinedUnsafeLibcFunc (const FunctionDecl &Node)
static bool isUnsafeMemset (const CallExpr &Node, ASTContext &Ctx)
static bool isUnsafeVaListPrintfFunc (const FunctionDecl &Node)
static bool isUnsafeSprintfFunc (const FunctionDecl &Node)
static bool isNormalPrintfFunc (const FunctionDecl &Node)
static bool hasUnsafePrintfStringArg (const CallExpr &Node, ASTContext &Ctx, MatchResult &Result, llvm::StringRef Tag)
static bool hasUnsafeSnprintfBuffer (const CallExpr &Node, ASTContext &Ctx)

Function Documentation

◆ hasUnsafeFormatOrSArg()

◆ hasUnsafePrintfStringArg()

◆ hasUnsafeSnprintfBuffer()

◆ isNormalPrintfFunc()

bool libc_func_matchers::isNormalPrintfFunc ( const FunctionDecl & Node)
static

◆ isPredefinedUnsafeLibcFunc()

bool libc_func_matchers::isPredefinedUnsafeLibcFunc ( const FunctionDecl & Node)
static

◆ isUnsafeMemset()

◆ isUnsafeSprintfFunc()

bool libc_func_matchers::isUnsafeSprintfFunc ( const FunctionDecl & Node)
static

◆ isUnsafeVaListPrintfFunc()

bool libc_func_matchers::isUnsafeVaListPrintfFunc ( const FunctionDecl & Node)
static

◆ matchLibcName()

StringRef libc_func_matchers::matchLibcName ( StringRef Name)
static

Definition at line 850 of file UnsafeBufferUsage.cpp.

Referenced by matchLibcNameOrBuiltinChk(), and matchName().

◆ matchLibcNameOrBuiltinChk()

StringRef libc_func_matchers::matchLibcNameOrBuiltinChk ( StringRef Name)
static

Definition at line 858 of file UnsafeBufferUsage.cpp.

References matchLibcName().

Referenced by matchName().

◆ matchName()

StringRef libc_func_matchers::matchName ( StringRef FunName,
bool isBuiltin )
static