9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_RESTRICTINCLUDESSCHECK_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_RESTRICTINCLUDESSCHECK_H 12 #include "../ClangTidyCheck.h" 13 #include "../ClangTidyDiagnosticConsumer.h" 14 #include "../utils/OptionsUtils.h" 29 AllowedIncludes(
Options.get(
"Includes",
"*")),
30 AllowedIncludesGlobList(AllowedIncludes) {}
33 Preprocessor *ModuleExpanderPP)
override;
36 return AllowedIncludesGlobList.
contains(FileName);
40 std::string AllowedIncludes;
48 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_RESTRICTINCLUDESSCHECK_H void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override
Override this to register PPCallbacks in the preprocessor.
Read-only set of strings represented as a list of positive and negative globs.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
bool contains(StringRef S)
Returns true if the pattern matches S.
Checks for allowed includes and suggests removal of any others.
Base class for all clang-tidy checks.
RestrictSystemIncludesCheck(StringRef Name, ClangTidyContext *Context)
static constexpr llvm::StringLiteral Name
std::map< std::string, std::string > OptionMap
bool contains(StringRef FileName)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.