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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clang-tidy/bugprone/IncDecInConditionsCheck.cpp | ||
---|---|---|
31 | OperatorMacher missing t in its spelling. | |
clang-tools-extra/clang-tidy/utils/Matchers.h | ||
143 | A comment can be here for this struct. | |
152 | A comment can be here for this matcher. | |
clang-tools-extra/docs/clang-tidy/checks/bugprone/inc-dec-in-conditions.rst | ||
63 | If it is false then the second statement will be evaluated, right? |
clang-tools-extra/docs/clang-tidy/checks/bugprone/inc-dec-in-conditions.rst | ||
---|---|---|
63 | Yes my bad, I will correct this. |
OperatorMacher missing t in its spelling.