clang-tools 22.0.0git
|
Finds code that uses pipe2() without using the O_CLOEXEC flag. More...
#include <CloexecPipe2Check.h>
Public Member Functions | |
CloexecPipe2Check (StringRef Name, ClangTidyContext *Context) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
Public Member Functions inherited from clang::tidy::android::CloexecCheck | |
CloexecCheck (StringRef Name, ClangTidyContext *Context) |
Additional Inherited Members | |
Protected Member Functions inherited from clang::tidy::android::CloexecCheck | |
void | registerMatchersImpl (ast_matchers::MatchFinder *Finder, ast_matchers::internal::Matcher< FunctionDecl > Function) |
void | insertMacroFlag (const ast_matchers::MatchFinder::MatchResult &Result, StringRef MacroFlag, int ArgPos) |
Currently, we have three types of fixes. | |
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. | |
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 each char represents a mode rather than a macro. | |
StringRef | getSpellingArg (const ast_matchers::MatchFinder::MatchResult &Result, int N) const |
Helper function to get the spelling of a particular argument. | |
Static Protected Attributes inherited from clang::tidy::android::CloexecCheck | |
static const char * | FuncDeclBindingStr = "funcDecl" |
Binding name of the FuncDecl of a function call. | |
static const char * | FuncBindingStr = "func" |
Binding name of the function call expression. |
Finds code that uses pipe2() without using the O_CLOEXEC flag.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/android/cloexec-pipe2.html
Definition at line 20 of file CloexecPipe2Check.h.
|
inline |
Definition at line 22 of file CloexecPipe2Check.h.
References clang::tidy::android::CloexecCheck::CloexecCheck().
|
override |
Definition at line 23 of file CloexecPipe2Check.cpp.
References clang::tidy::android::CloexecCheck::insertMacroFlag().
|
override |
Definition at line 16 of file CloexecPipe2Check.cpp.
References clang::tidy::android::CloexecCheck::registerMatchersImpl().