clang-tools 22.0.0git
|
Detects when a variable is both incremented/decremented and referenced inside a complex condition and suggests moving them outside to avoid ambiguity in the variable's value. More...
#include <IncDecInConditionsCheck.h>
Public Member Functions | |
IncDecInConditionsCheck (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 |
Detects when a variable is both incremented/decremented and referenced inside a complex condition and suggests moving them outside to avoid ambiguity in the variable's value.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/inc-dec-in-conditions.html
Definition at line 22 of file IncDecInConditionsCheck.h.
|
inline |
Definition at line 24 of file IncDecInConditionsCheck.h.
|
override |
Definition at line 66 of file IncDecInConditionsCheck.cpp.
|
inlineoverride |
Definition at line 28 of file IncDecInConditionsCheck.h.
|
override |
Definition at line 33 of file IncDecInConditionsCheck.cpp.