9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOT_NULL_TERMINATED_RESULT_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOT_NULL_TERMINATED_RESULT_H 12 #include "../ClangTidy.h" 31 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
33 Preprocessor *ModuleExpanderPP)
override;
39 const int WantToUseSafeFunctions;
41 bool UseSafeFunctions =
false;
43 void memoryHandlerFunctionFix(
44 StringRef Name,
const ast_matchers::MatchFinder::MatchResult &Result);
45 void memcpyFix(StringRef Name,
46 const ast_matchers::MatchFinder::MatchResult &Result,
47 DiagnosticBuilder &Diag);
48 void memcpy_sFix(StringRef Name,
49 const ast_matchers::MatchFinder::MatchResult &Result,
50 DiagnosticBuilder &Diag);
51 void memchrFix(StringRef Name,
52 const ast_matchers::MatchFinder::MatchResult &Result);
53 void memmoveFix(StringRef Name,
54 const ast_matchers::MatchFinder::MatchResult &Result,
55 DiagnosticBuilder &Diag);
56 void strerror_sFix(
const ast_matchers::MatchFinder::MatchResult &Result);
57 void ncmpFix(StringRef Name,
58 const ast_matchers::MatchFinder::MatchResult &Result);
59 void xfrmFix(StringRef Name,
60 const ast_matchers::MatchFinder::MatchResult &Result);
67 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOT_NULL_TERMINATED_RESULT_H void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
Finds function calls where it is possible to cause a not null-terminated result.
Base class for all clang-tidy checks.
NotNullTerminatedResultCheck(StringRef Name, ClangTidyContext *Context)
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
static constexpr llvm::StringLiteral Name
std::map< std::string, std::string > OptionMap
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override
Override this to register PPCallbacks in the preprocessor.