clang-tools 22.0.0git
clang::tidy::cppcoreguidelines::UseEnumClassCheck Class Reference

Finds unscoped (non-class) enum declarations and suggests using enum class instead. More...

#include <UseEnumClassCheck.h>

Inheritance diagram for clang::tidy::cppcoreguidelines::UseEnumClassCheck:
[legend]

Public Member Functions

 UseEnumClassCheck (StringRef Name, ClangTidyContext *Context)
void storeOptions (ClangTidyOptions::OptionMap &Opts) override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Finds unscoped (non-class) enum declarations and suggests using enum class instead.

For the user-facing documentation see: http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/use-enum-class.html

Definition at line 21 of file UseEnumClassCheck.h.

Constructor & Destructor Documentation

◆ UseEnumClassCheck()

clang::tidy::cppcoreguidelines::UseEnumClassCheck::UseEnumClassCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 16 of file UseEnumClassCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::cppcoreguidelines::UseEnumClassCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 34 of file UseEnumClassCheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::cppcoreguidelines::UseEnumClassCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 30 of file UseEnumClassCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::cppcoreguidelines::UseEnumClassCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 27 of file UseEnumClassCheck.h.

◆ registerMatchers()

void clang::tidy::cppcoreguidelines::UseEnumClassCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 26 of file UseEnumClassCheck.cpp.

◆ storeOptions()

void clang::tidy::cppcoreguidelines::UseEnumClassCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

Definition at line 21 of file UseEnumClassCheck.cpp.


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