clang-tools 22.0.0git
clang::tidy::misc::AnonymousNamespaceInHeaderCheck Class Reference

Finds anonymous namespaces in headers. More...

#include <AnonymousNamespaceInHeaderCheck.h>

Inheritance diagram for clang::tidy::misc::AnonymousNamespaceInHeaderCheck:
[legend]

Public Member Functions

 AnonymousNamespaceInHeaderCheck (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/misc/anonymous-namespace-in-header.html

Definition at line 24 of file AnonymousNamespaceInHeaderCheck.h.

Constructor & Destructor Documentation

◆ AnonymousNamespaceInHeaderCheck()

clang::tidy::misc::AnonymousNamespaceInHeaderCheck::AnonymousNamespaceInHeaderCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 18 of file AnonymousNamespaceInHeaderCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::misc::AnonymousNamespaceInHeaderCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::misc::AnonymousNamespaceInHeaderCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 27 of file AnonymousNamespaceInHeaderCheck.h.

◆ registerMatchers()

void clang::tidy::misc::AnonymousNamespaceInHeaderCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 23 of file AnonymousNamespaceInHeaderCheck.cpp.


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