xref: /llvm-project/clang-tools-extra/clang-tidy/android/CloexecInotifyInitCheck.h (revision 4718da506091a37ca4863d979bc541e359b79b10)
12e6f9a16SChih-Hung Hsieh //===--- CloexecInotifyInitCheck.h - clang-tidy------------------*- C++ -*-===//
22e6f9a16SChih-Hung Hsieh //
32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
62e6f9a16SChih-Hung Hsieh //
72e6f9a16SChih-Hung Hsieh //===----------------------------------------------------------------------===//
82e6f9a16SChih-Hung Hsieh 
92e6f9a16SChih-Hung Hsieh #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_INOTIFY_INIT_H
102e6f9a16SChih-Hung Hsieh #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_INOTIFY_INIT_H
112e6f9a16SChih-Hung Hsieh 
122e6f9a16SChih-Hung Hsieh #include "CloexecCheck.h"
132e6f9a16SChih-Hung Hsieh 
14*4718da50SCarlos Galvez namespace clang::tidy::android {
152e6f9a16SChih-Hung Hsieh 
162e6f9a16SChih-Hung Hsieh /// inotify_init() is better to be replaced by inotify_init1().
172e6f9a16SChih-Hung Hsieh ///
182e6f9a16SChih-Hung Hsieh /// For the user-facing documentation see:
196e566bc5SRichard /// http://clang.llvm.org/extra/clang-tidy/checks/android/cloexec-inotify-init.html
202e6f9a16SChih-Hung Hsieh class CloexecInotifyInitCheck : public CloexecCheck {
212e6f9a16SChih-Hung Hsieh public:
CloexecInotifyInitCheck(StringRef Name,ClangTidyContext * Context)222e6f9a16SChih-Hung Hsieh   CloexecInotifyInitCheck(StringRef Name, ClangTidyContext *Context)
232e6f9a16SChih-Hung Hsieh       : CloexecCheck(Name, Context) {}
242e6f9a16SChih-Hung Hsieh   void registerMatchers(ast_matchers::MatchFinder *Finder) override;
252e6f9a16SChih-Hung Hsieh   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
262e6f9a16SChih-Hung Hsieh };
272e6f9a16SChih-Hung Hsieh 
28*4718da50SCarlos Galvez } // namespace clang::tidy::android
292e6f9a16SChih-Hung Hsieh 
302e6f9a16SChih-Hung Hsieh #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_INOTIFY_INIT_H
31