clang-tools 22.0.0git
|
Catches assignments within the condition clause of an if statement. More...
#include <AssignmentInIfConditionCheck.h>
Public Member Functions | |
AssignmentInIfConditionCheck (StringRef Name, ClangTidyContext *Context) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
void | report (const Expr *AssignmentExpr) |
Catches assignments within the condition clause of an if statement.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/assignment-in-if-condition.html
Definition at line 20 of file AssignmentInIfConditionCheck.h.
|
inline |
Definition at line 22 of file AssignmentInIfConditionCheck.h.
Referenced by check().
|
override |
Definition at line 22 of file AssignmentInIfConditionCheck.cpp.
References AssignmentInIfConditionCheck(), and report().
|
override |
Definition at line 18 of file AssignmentInIfConditionCheck.cpp.
void clang::tidy::bugprone::AssignmentInIfConditionCheck::report | ( | const Expr * | AssignmentExpr | ) |
Definition at line 68 of file AssignmentInIfConditionCheck.cpp.
Referenced by check().