clang-tools 22.0.0git
clang::tidy::portability::RestrictSystemIncludesCheck Class Reference

Checks for allowed includes and suggests removal of any others. More...

#include <RestrictSystemIncludesCheck.h>

Inheritance diagram for clang::tidy::portability::RestrictSystemIncludesCheck:
[legend]

Public Member Functions

 RestrictSystemIncludesCheck (StringRef Name, ClangTidyContext *Context, std::string DefaultAllowedIncludes="*")
void registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override
void storeOptions (ClangTidyOptions::OptionMap &Opts) override
bool contains (StringRef FileName)

Detailed Description

Checks for allowed includes and suggests removal of any others.

If no includes are specified, the check will exit without issuing any warnings.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/portability/restrict-system-includes.html

Definition at line 23 of file RestrictSystemIncludesCheck.h.

Constructor & Destructor Documentation

◆ RestrictSystemIncludesCheck()

clang::tidy::portability::RestrictSystemIncludesCheck::RestrictSystemIncludesCheck ( StringRef Name,
ClangTidyContext * Context,
std::string DefaultAllowedIncludes = "*" )
inline

Member Function Documentation

◆ contains()

bool clang::tidy::portability::RestrictSystemIncludesCheck::contains ( StringRef FileName)
inline

Definition at line 34 of file RestrictSystemIncludesCheck.h.

◆ registerPPCallbacks()

void clang::tidy::portability::RestrictSystemIncludesCheck::registerPPCallbacks ( const SourceManager & SM,
Preprocessor * PP,
Preprocessor * ModuleExpanderPP )
override

Definition at line 65 of file RestrictSystemIncludesCheck.cpp.

◆ storeOptions()

void clang::tidy::portability::RestrictSystemIncludesCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

Definition at line 71 of file RestrictSystemIncludesCheck.cpp.


The documentation for this class was generated from the following files: