10 #include "clang/AST/ASTContext.h"
11 #include "clang/ASTMatchers/ASTMatchFinder.h"
19 void CloexecInotifyInitCheck::registerMatchers(MatchFinder *Finder) {
21 Finder, functionDecl(returns(isInteger()), hasName(
"inotify_init")));
24 void CloexecInotifyInitCheck::check(
const MatchFinder::MatchResult &Result) {
26 "prefer inotify_init() to inotify_init1() "
27 "because inotify_init1() allows IN_CLOEXEC",
28 "inotify_init1(IN_CLOEXEC)");