|
clang-tools 22.0.0git
|
Finds code that uses accept4() without using the SOCK_CLOEXEC flag. More...
#include <CloexecAccept4Check.h>
Public Member Functions | |
| CloexecAccept4Check (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, const 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, char Mode, 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 constexpr char | FuncDeclBindingStr [] = "funcDecl" |
| Binding name of the FuncDecl of a function call. | |
| static constexpr char | FuncBindingStr [] = "func" |
| Binding name of the function call expression. | |
Finds code that uses accept4() without using the SOCK_CLOEXEC flag.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/android/cloexec-accept4.html
Definition at line 20 of file CloexecAccept4Check.h.
|
inline |
Definition at line 22 of file CloexecAccept4Check.h.
References clang::tidy::android::CloexecCheck::CloexecCheck().
|
override |
Definition at line 29 of file CloexecAccept4Check.cpp.
References clang::tidy::android::CloexecCheck::insertMacroFlag().
|
override |
Definition at line 16 of file CloexecAccept4Check.cpp.
References clang::tidy::android::CloexecCheck::registerMatchersImpl().