clang-tools 22.0.0git
clang::tidy::modernize::MacroToEnumCheck Class Reference

Replaces groups of related macros with an unscoped anonymous enum. More...

#include <MacroToEnumCheck.h>

Inheritance diagram for clang::tidy::modernize::MacroToEnumCheck:
[legend]

Public Member Functions

 MacroToEnumCheck (StringRef Name, ClangTidyContext *Context)
void registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Replaces groups of related macros with an unscoped anonymous enum.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/macro-to-enum.html

Definition at line 22 of file MacroToEnumCheck.h.

Constructor & Destructor Documentation

◆ MacroToEnumCheck()

clang::tidy::modernize::MacroToEnumCheck::MacroToEnumCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 24 of file MacroToEnumCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::modernize::MacroToEnumCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ registerMatchers()

void clang::tidy::modernize::MacroToEnumCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 520 of file MacroToEnumCheck.cpp.

◆ registerPPCallbacks()

void clang::tidy::modernize::MacroToEnumCheck::registerPPCallbacks ( const SourceManager & SM,
Preprocessor * PP,
Preprocessor * ModuleExpanderPP )
override

Definition at line 511 of file MacroToEnumCheck.cpp.


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