clang-tools 22.0.0git
|
Detects explicit type casting operations that involve the same source and destination types, and subsequently recommend their removal. More...
#include <RedundantCastingCheck.h>
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 |
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.
clang::tidy::readability::RedundantCastingCheck::RedundantCastingCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 93 of file RedundantCastingCheck.cpp.
|
override |
Definition at line 135 of file RedundantCastingCheck.cpp.
References clang::tidy::readability::areBinaryOperatorOperandsTypesEqualToOperatorResultType(), clang::tidy::utils::fixit::areParensNeededForStatement(), clang::tidy::readability::areTypesEqual(), and clang::tidy::readability::getSourceExprDecl().
|
inlineoverride |
Definition at line 27 of file RedundantCastingCheck.h.
|
override |
Definition at line 104 of file RedundantCastingCheck.cpp.
|
override |
Definition at line 99 of file RedundantCastingCheck.cpp.