13da331b4SGeorge Burgess IV //===--- CloexecPipe2Check.h - clang-tidy------------------------*- C++ -*-===// 23da331b4SGeorge Burgess IV // 33da331b4SGeorge Burgess IV // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 43da331b4SGeorge Burgess IV // See https://llvm.org/LICENSE.txt for license information. 53da331b4SGeorge Burgess IV // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 63da331b4SGeorge Burgess IV // 73da331b4SGeorge Burgess IV //===----------------------------------------------------------------------===// 83da331b4SGeorge Burgess IV 93da331b4SGeorge Burgess IV #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_PIPE2_H 103da331b4SGeorge Burgess IV #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_PIPE2_H 113da331b4SGeorge Burgess IV 123da331b4SGeorge Burgess IV #include "CloexecCheck.h" 133da331b4SGeorge Burgess IV 14*4718da50SCarlos Galvez namespace clang::tidy::android { 153da331b4SGeorge Burgess IV 163da331b4SGeorge Burgess IV /// Finds code that uses pipe2() without using the O_CLOEXEC flag. 173da331b4SGeorge Burgess IV /// 183da331b4SGeorge Burgess IV /// For the user-facing documentation see: 196e566bc5SRichard /// http://clang.llvm.org/extra/clang-tidy/checks/android/cloexec-pipe2.html 203da331b4SGeorge Burgess IV class CloexecPipe2Check : public CloexecCheck { 213da331b4SGeorge Burgess IV public: CloexecPipe2Check(StringRef Name,ClangTidyContext * Context)223da331b4SGeorge Burgess IV CloexecPipe2Check(StringRef Name, ClangTidyContext *Context) 233da331b4SGeorge Burgess IV : CloexecCheck(Name, Context) {} 243da331b4SGeorge Burgess IV void registerMatchers(ast_matchers::MatchFinder *Finder) override; 253da331b4SGeorge Burgess IV void check(const ast_matchers::MatchFinder::MatchResult &Result) override; 263da331b4SGeorge Burgess IV }; 273da331b4SGeorge Burgess IV 28*4718da50SCarlos Galvez } // namespace clang::tidy::android 293da331b4SGeorge Burgess IV 303da331b4SGeorge Burgess IV #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_PIPE2_H 31