clang-tools 22.0.0git
clang::tidy::readability::UppercaseLiteralSuffixCheck Class Reference

Detects when the integral literal or floating point literal has non-uppercase suffix, and suggests to make the suffix uppercase. More...

#include <UppercaseLiteralSuffixCheck.h>

Inheritance diagram for clang::tidy::readability::UppercaseLiteralSuffixCheck:
[legend]

Public Member Functions

 UppercaseLiteralSuffixCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
void storeOptions (ClangTidyOptions::OptionMap &Opts) override
std::optional< TraversalKind > getCheckTraversalKind () const override
template<typename LiteralType>
bool checkBoundMatch (const MatchFinder::MatchResult &Result)

Detailed Description

Detects when the integral literal or floating point literal has non-uppercase suffix, and suggests to make the suffix uppercase.

Alternatively, a list of destination suffixes can be provided.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/uppercase-literal-suffix.html

Definition at line 23 of file UppercaseLiteralSuffixCheck.h.

Constructor & Destructor Documentation

◆ UppercaseLiteralSuffixCheck()

clang::tidy::readability::UppercaseLiteralSuffixCheck::UppercaseLiteralSuffixCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 179 of file UppercaseLiteralSuffixCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::readability::UppercaseLiteralSuffixCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 229 of file UppercaseLiteralSuffixCheck.cpp.

◆ checkBoundMatch()

template<typename LiteralType>
bool clang::tidy::readability::UppercaseLiteralSuffixCheck::checkBoundMatch ( const MatchFinder::MatchResult & Result)

Definition at line 206 of file UppercaseLiteralSuffixCheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::readability::UppercaseLiteralSuffixCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 29 of file UppercaseLiteralSuffixCheck.h.

◆ registerMatchers()

void clang::tidy::readability::UppercaseLiteralSuffixCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 193 of file UppercaseLiteralSuffixCheck.cpp.

◆ storeOptions()

void clang::tidy::readability::UppercaseLiteralSuffixCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

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