10 #include "../ClangTidy.h" 11 #include "../ClangTidyModule.h" 12 #include "../ClangTidyModuleRegistry.h" 42 "android-cloexec-epoll-create1");
44 "android-cloexec-epoll-create");
47 "android-cloexec-inotify-init1");
49 "android-cloexec-inotify-init");
51 "android-cloexec-memfd-create");
55 "android-comparison-in-temp-failure-retry");
60 static ClangTidyModuleRegistry::Add<AndroidModule>
61 X(
"android-module",
"Adds Android platform checks.");
creat() is better to be replaced by open().
epoll_create() is better to be replaced by epoll_create1().
Finds code that opens file without using the O_CLOEXEC flag.
void registerCheck(StringRef CheckName)
Registers the CheckType with the name Name.
static ClangTidyModuleRegistry::Add< AndroidModule > X("android-module", "Adds Android platform checks.")
volatile int AndroidModuleAnchorSource
A collection of ClangTidyCheckFactory instances.
Attempts to catch calls to TEMP_FAILURE_RETRY with a top-level comparison operation, like TEMP_FAILURE_RETRY(read(...) != N).
inotify_init() is better to be replaced by inotify_init1().
Finds code that uses epoll_create1() without using the EPOLL_CLOEXEC flag.
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
fopen() is suggested to include "e" in their mode string; like "re" would be better than "r"...
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module...
Finds code that uses inotify_init1() without using the IN_CLOEXEC flag.
Finds code that uses accept4() without using the SOCK_CLOEXEC flag.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
accept() is better to be replaced by accept4().
This module is for Android specific checks.
Finds code that uses socket() without using the SOCK_CLOEXEC flag.
Finds code that uses memfd_create() without using the MFD_CLOEXEC flag.
dup() is better to be replaced by fcntl(), which has close-on-exec flag.