Go to the documentation of this file.
9 #include "../ClangTidy.h"
10 #include "../ClangTidyModule.h"
11 #include "../ClangTidyModuleRegistry.h"
43 "android-cloexec-epoll-create1");
45 "android-cloexec-epoll-create");
48 "android-cloexec-inotify-init1");
50 "android-cloexec-inotify-init");
52 "android-cloexec-memfd-create");
58 "android-comparison-in-temp-failure-retry");
63 static ClangTidyModuleRegistry::Add<AndroidModule>
64 X(
"android-module",
"Adds Android platform checks.");
Finds code that uses epoll_create1() without using the EPOLL_CLOEXEC flag.
creat() is better to be replaced by open().
Suggests to replace calls to pipe() with calls to pipe2().
Attempts to catch calls to TEMP_FAILURE_RETRY with a top-level comparison operation,...
Finds code that uses inotify_init1() without using the IN_CLOEXEC flag.
inotify_init() is better to be replaced by inotify_init1().
A collection of ClangTidyCheckFactory instances.
Finds code that uses accept4() without using the SOCK_CLOEXEC flag.
Finds code that uses pipe2() without using the O_CLOEXEC flag.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module.
volatile int AndroidModuleAnchorSource
This module is for Android specific checks.
static ClangTidyModuleRegistry::Add< AndroidModule > X("android-module", "Adds Android platform checks.")
accept() is better to be replaced by accept4().
fopen() is suggested to include "e" in their mode string; like "re" would be better than "r".
Finds code that opens file without using the O_CLOEXEC flag.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
epoll_create() is better to be replaced by epoll_create1().
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.
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
void registerCheck(llvm::StringRef CheckName)
Registers the CheckType with the name Name.