clang-tools 24.0.0git
clang::tidy::modernize::UseIfConstevalCheck Class Reference

Use if consteval instead of std::is_constant_evaluated in if statements. More...

#include <UseIfConstevalCheck.h>

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

Public Member Functions

 UseIfConstevalCheck (StringRef Name, ClangTidyContext *Context)
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

Use if consteval instead of std::is_constant_evaluated in if statements.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-if-consteval.html

Definition at line 20 of file UseIfConstevalCheck.h.

Constructor & Destructor Documentation

◆ UseIfConstevalCheck()

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

Definition at line 22 of file UseIfConstevalCheck.h.

Member Function Documentation

◆ check()

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

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::modernize::UseIfConstevalCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 29 of file UseIfConstevalCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::modernize::UseIfConstevalCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 26 of file UseIfConstevalCheck.h.

◆ registerMatchers()

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

Definition at line 69 of file UseIfConstevalCheck.cpp.


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