clang-tools 22.0.0git
clang::tidy::bugprone::StdNamespaceModificationCheck Class Reference

Modification of the std or posix namespace can result in undefined behavior. More...

#include <StdNamespaceModificationCheck.h>

Inheritance diagram for clang::tidy::bugprone::StdNamespaceModificationCheck:
[legend]

Public Member Functions

 StdNamespaceModificationCheck (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

Modification of the std or posix namespace can result in undefined behavior.

This check warns for such modifications.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/std-namespace-modification.html

Definition at line 21 of file StdNamespaceModificationCheck.h.

Constructor & Destructor Documentation

◆ StdNamespaceModificationCheck()

clang::tidy::bugprone::StdNamespaceModificationCheck::StdNamespaceModificationCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file StdNamespaceModificationCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::bugprone::StdNamespaceModificationCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::bugprone::StdNamespaceModificationCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file StdNamespaceModificationCheck.h.

◆ registerMatchers()

void clang::tidy::bugprone::StdNamespaceModificationCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 41 of file StdNamespaceModificationCheck.cpp.


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