xref: /llvm-project/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.h (revision 4718da506091a37ca4863d979bc541e359b79b10)
1ae3527e6SChih-Hung Hsieh //===--- CloexecAcceptCheck.h - clang-tidy-----------------------*- C++ -*-===//
2ae3527e6SChih-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
6ae3527e6SChih-Hung Hsieh //
7ae3527e6SChih-Hung Hsieh //===----------------------------------------------------------------------===//
8ae3527e6SChih-Hung Hsieh 
9ae3527e6SChih-Hung Hsieh #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_ACCEPT_H
10ae3527e6SChih-Hung Hsieh #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_ACCEPT_H
11ae3527e6SChih-Hung Hsieh 
12ae3527e6SChih-Hung Hsieh #include "CloexecCheck.h"
13ae3527e6SChih-Hung Hsieh 
14*4718da50SCarlos Galvez namespace clang::tidy::android {
15ae3527e6SChih-Hung Hsieh 
16ae3527e6SChih-Hung Hsieh /// accept() is better to be replaced by accept4().
17ae3527e6SChih-Hung Hsieh ///
18ae3527e6SChih-Hung Hsieh /// For the user-facing documentation see:
196e566bc5SRichard /// http://clang.llvm.org/extra/clang-tidy/checks/android/cloexec-accept.html
20ae3527e6SChih-Hung Hsieh class CloexecAcceptCheck : public CloexecCheck {
21ae3527e6SChih-Hung Hsieh public:
CloexecAcceptCheck(StringRef Name,ClangTidyContext * Context)22ae3527e6SChih-Hung Hsieh   CloexecAcceptCheck(StringRef Name, ClangTidyContext *Context)
23ae3527e6SChih-Hung Hsieh       : CloexecCheck(Name, Context) {}
24ae3527e6SChih-Hung Hsieh   void registerMatchers(ast_matchers::MatchFinder *Finder) override;
25ae3527e6SChih-Hung Hsieh   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
26ae3527e6SChih-Hung Hsieh };
27ae3527e6SChih-Hung Hsieh 
28*4718da50SCarlos Galvez } // namespace clang::tidy::android
29ae3527e6SChih-Hung Hsieh 
30ae3527e6SChih-Hung Hsieh #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_ACCEPT_H
31