clang-tools 22.0.0git
UnsafeFunctionsCheck.cpp File Reference
#include "UnsafeFunctionsCheck.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include <cassert>

Go to the source code of this file.

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
namespace  clang::tidy
namespace  clang::tidy::bugprone

Functions

static std::optional< std::string > clang::tidy::bugprone::getAnnexKReplacementFor (StringRef FunctionName)
static StringRef clang::tidy::bugprone::getReplacementFor (StringRef FunctionName, bool IsAnnexKAvailable)
static StringRef clang::tidy::bugprone::getReplacementForAdditional (StringRef FunctionName, bool IsAnnexKAvailable)
static StringRef clang::tidy::bugprone::getRationaleFor (StringRef FunctionName)
static bool clang::tidy::bugprone::isAnnexKAvailable (std::optional< bool > &CacheVar, Preprocessor *PP, const LangOptions &LO)
 Calculates whether Annex K is available for the current translation unit based on the macro definitions and the language options.
static std::vector< UnsafeFunctionsCheck::CheckedFunctionclang::tidy::bugprone::parseCheckedFunctions (StringRef Option, ClangTidyContext *Context)
static std::string clang::tidy::bugprone::serializeCheckedFunctions (const std::vector< UnsafeFunctionsCheck::CheckedFunction > &Functions)

Variables

static constexpr llvm::StringLiteral clang::tidy::bugprone::OptionNameCustomFunctions
static constexpr llvm::StringLiteral clang::tidy::bugprone::OptionNameReportDefaultFunctions
static constexpr llvm::StringLiteral clang::tidy::bugprone::OptionNameReportMoreUnsafeFunctions
static constexpr llvm::StringLiteral clang::tidy::bugprone::FunctionNamesWithAnnexKReplacementId
static constexpr llvm::StringLiteral clang::tidy::bugprone::FunctionNamesId = "FunctionsNames"
static constexpr llvm::StringLiteral clang::tidy::bugprone::AdditionalFunctionNamesId
static constexpr llvm::StringLiteral clang::tidy::bugprone::CustomFunctionNamesId
static constexpr llvm::StringLiteral clang::tidy::bugprone::DeclRefId = "DRE"