clang-tools 22.0.0git
clang::tidy::bugprone::RedundantBranchConditionCheck Class Reference

Finds condition variables in nested if statements that were also checked in the outer if statement and were not changed. More...

#include <RedundantBranchConditionCheck.h>

Inheritance diagram for clang::tidy::bugprone::RedundantBranchConditionCheck:
[legend]

Public Member Functions

 RedundantBranchConditionCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Finds condition variables in nested if statements that were also checked in the outer if statement and were not changed.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/redundant-branch-condition.html

Definition at line 21 of file RedundantBranchConditionCheck.h.

Constructor & Destructor Documentation

◆ RedundantBranchConditionCheck()

clang::tidy::bugprone::RedundantBranchConditionCheck::RedundantBranchConditionCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file RedundantBranchConditionCheck.h.

Member Function Documentation

◆ check()

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::bugprone::RedundantBranchConditionCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 27 of file RedundantBranchConditionCheck.h.

◆ registerMatchers()


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