clang-tools 23.0.0git
clang::tidy::google::runtime::IntegerTypesCheck Class Reference

Finds uses of short, long and long long and suggest replacing them with u?intXX(_t)?. More...

#include <IntegerTypesCheck.h>

Inheritance diagram for clang::tidy::google::runtime::IntegerTypesCheck:
[legend]

Public Member Functions

 IntegerTypesCheck (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
void storeOptions (ClangTidyOptions::OptionMap &Opts) override
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Finds uses of short, long and long long and suggest replacing them with u?intXX(_t)?.

Corresponding cpplint.py check: 'runtime/int'.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/google/runtime-int.html

Definition at line 29 of file IntegerTypesCheck.h.

Constructor & Destructor Documentation

◆ IntegerTypesCheck()

clang::tidy::google::runtime::IntegerTypesCheck::IntegerTypesCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 75 of file IntegerTypesCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::google::runtime::IntegerTypesCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 104 of file IntegerTypesCheck.cpp.

References clang::getTokenAtLoc().

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::google::runtime::IntegerTypesCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 38 of file IntegerTypesCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::google::runtime::IntegerTypesCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 32 of file IntegerTypesCheck.h.

◆ registerMatchers()

void clang::tidy::google::runtime::IntegerTypesCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 87 of file IntegerTypesCheck.cpp.

◆ storeOptions()

void clang::tidy::google::runtime::IntegerTypesCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

Definition at line 81 of file IntegerTypesCheck.cpp.


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