clang-tools 22.0.0git
clang::tidy::google::build::UnnamedNamespaceInHeaderCheck Class Reference

Finds anonymous namespaces in headers. More...

#include <UnnamedNamespaceInHeaderCheck.h>

Inheritance diagram for clang::tidy::google::build::UnnamedNamespaceInHeaderCheck:
[legend]

Public Member Functions

 UnnamedNamespaceInHeaderCheck (StringRef Name, ClangTidyContext *Context)
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Finds anonymous namespaces in headers.

https://google.github.io/styleguide/cppguide.html#Namespaces

Corresponding cpplint.py check name: 'build/namespaces'.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/google/build-namespaces.html

Definition at line 25 of file UnnamedNamespaceInHeaderCheck.h.

Constructor & Destructor Documentation

◆ UnnamedNamespaceInHeaderCheck()

clang::tidy::google::build::UnnamedNamespaceInHeaderCheck::UnnamedNamespaceInHeaderCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 17 of file UnnamedNamespaceInHeaderCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::google::build::UnnamedNamespaceInHeaderCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::google::build::UnnamedNamespaceInHeaderCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 28 of file UnnamedNamespaceInHeaderCheck.h.

◆ registerMatchers()

void clang::tidy::google::build::UnnamedNamespaceInHeaderCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 22 of file UnnamedNamespaceInHeaderCheck.cpp.


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