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

Detects if/else statements where one branch uses braces and the other does not. More...

#include <InconsistentIfElseBracesCheck.h>

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

Public Member Functions

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

Detects if/else statements where one branch uses braces and the other does not.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/inconsistent-ifelse-braces.html

Definition at line 23 of file InconsistentIfElseBracesCheck.h.

Constructor & Destructor Documentation

◆ InconsistentIfElseBracesCheck()

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

Definition at line 25 of file InconsistentIfElseBracesCheck.h.

Member Function Documentation

◆ check()

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

◆ getCheckTraversalKind()

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

Definition at line 29 of file InconsistentIfElseBracesCheck.h.

◆ registerMatchers()

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

Definition at line 37 of file InconsistentIfElseBracesCheck.cpp.


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