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

Detects explicit type casting operations that involve the same source and destination types, and subsequently recommend their removal. More...

#include <RedundantCastingCheck.h>

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

Public Member Functions

 RedundantCastingCheck (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

Detailed Description

Detects explicit type casting operations that involve the same source and destination types, and subsequently recommend their removal.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-casting.html

Definition at line 21 of file RedundantCastingCheck.h.

Constructor & Destructor Documentation

◆ RedundantCastingCheck()

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

Definition at line 93 of file RedundantCastingCheck.cpp.

Member Function Documentation

◆ check()

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

◆ getCheckTraversalKind()

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

Definition at line 27 of file RedundantCastingCheck.h.

◆ registerMatchers()

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

Definition at line 104 of file RedundantCastingCheck.cpp.

◆ storeOptions()

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

Definition at line 99 of file RedundantCastingCheck.cpp.


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