clang-tools 22.0.0git
clang::tidy::google::readability::GlobalNamesInHeadersCheck Class Reference

Flag global namespace pollution in header files. More...

#include <GlobalNamesInHeadersCheck.h>

Inheritance diagram for clang::tidy::google::readability::GlobalNamesInHeadersCheck:
[legend]

Public Member Functions

 GlobalNamesInHeadersCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Flag global namespace pollution in header files.

Right now it only triggers on using declarations and directives.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/google/global-names-in-headers.html

Definition at line 22 of file GlobalNamesInHeadersCheck.h.

Constructor & Destructor Documentation

◆ GlobalNamesInHeadersCheck()

clang::tidy::google::readability::GlobalNamesInHeadersCheck::GlobalNamesInHeadersCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 18 of file GlobalNamesInHeadersCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::google::readability::GlobalNamesInHeadersCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ registerMatchers()

void clang::tidy::google::readability::GlobalNamesInHeadersCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 23 of file GlobalNamesInHeadersCheck.cpp.


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