15 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_H 16 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_H 18 #include "../ClangTidyCheck.h" 36 ast_matchers::internal::Matcher<FunctionDecl> Function);
53 void insertMacroFlag(
const ast_matchers::MatchFinder::MatchResult &Result,
54 StringRef MacroFlag,
int ArgPos);
69 void replaceFunc(
const ast_matchers::MatchFinder::MatchResult &Result,
70 StringRef WarningMsg, StringRef FixMsg);
87 const char Mode,
const int ArgPos);
90 StringRef
getSpellingArg(
const ast_matchers::MatchFinder::MatchResult &Result,
104 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_H void insertStringFlag(const ast_matchers::MatchFinder::MatchResult &Result, const char Mode, const int ArgPos)
Type3 is also to add a flag to the corresponding argument, but this time, the flag is some string and...
void insertMacroFlag(const ast_matchers::MatchFinder::MatchResult &Result, StringRef MacroFlag, int ArgPos)
Currently, we have three types of fixes.
static const char * FuncBindingStr
Binding name of the function call expression.
Base class for all clang-tidy checks.
void registerMatchersImpl(ast_matchers::MatchFinder *Finder, ast_matchers::internal::Matcher< FunctionDecl > Function)
static constexpr llvm::StringLiteral Name
void replaceFunc(const ast_matchers::MatchFinder::MatchResult &Result, StringRef WarningMsg, StringRef FixMsg)
Type2 is to replace the API to another function that has required the ability.
CloexecCheck(StringRef Name, ClangTidyContext *Context)
The base class for all close-on-exec checks in Android module.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
StringRef getSpellingArg(const ast_matchers::MatchFinder::MatchResult &Result, int N) const
Helper function to get the spelling of a particular argument.
static const char * FuncDeclBindingStr
Binding name of the FuncDecl of a function call.