clang-tools 22.0.0git
clang::tidy::misc::RedundantExpressionCheck Class Reference

The checker detects expressions that are redundant, because they contain ineffective, useless parts. More...

#include <RedundantExpressionCheck.h>

Inheritance diagram for clang::tidy::misc::RedundantExpressionCheck:
[legend]

Public Member Functions

 RedundantExpressionCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

The checker detects expressions that are redundant, because they contain ineffective, useless parts.

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

Definition at line 21 of file RedundantExpressionCheck.h.

Constructor & Destructor Documentation

◆ RedundantExpressionCheck()

clang::tidy::misc::RedundantExpressionCheck::RedundantExpressionCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file RedundantExpressionCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::misc::RedundantExpressionCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 1299 of file RedundantExpressionCheck.cpp.

References clang::tidy::misc::Message.

◆ registerMatchers()

void clang::tidy::misc::RedundantExpressionCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 926 of file RedundantExpressionCheck.cpp.


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