clang-tools 22.0.0git
clang::tidy::cert::DontModifyStdNamespaceCheck Class Reference

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

#include <DontModifyStdNamespaceCheck.h>

Inheritance diagram for clang::tidy::cert::DontModifyStdNamespaceCheck:
[legend]

Public Member Functions

 DontModifyStdNamespaceCheck (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/cert/dcl58-cpp.html

Definition at line 21 of file DontModifyStdNamespaceCheck.h.

Constructor & Destructor Documentation

◆ DontModifyStdNamespaceCheck()

clang::tidy::cert::DontModifyStdNamespaceCheck::DontModifyStdNamespaceCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file DontModifyStdNamespaceCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::cert::DontModifyStdNamespaceCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::cert::DontModifyStdNamespaceCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file DontModifyStdNamespaceCheck.h.

◆ registerMatchers()

void clang::tidy::cert::DontModifyStdNamespaceCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 41 of file DontModifyStdNamespaceCheck.cpp.


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