|
clang-tools 22.0.0git
|
This check diagnoses when the loop induction expression of a for loop has floating-point type. More...
#include <FloatLoopCounterCheck.h>
Public Member Functions | |
| FloatLoopCounterCheck (StringRef Name, ClangTidyContext *Context) | |
| void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
| void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
This check diagnoses when the loop induction expression of a for loop has floating-point type.
The check corresponds to: https://www.securecoding.cert.org/confluence/display/c/FLP30-C.+Do+not+use+floating-point+variables+as+loop+counters
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/float-loop-counter.html
Definition at line 22 of file FloatLoopCounterCheck.h.
|
inline |
Definition at line 24 of file FloatLoopCounterCheck.h.
|
override |
Definition at line 32 of file FloatLoopCounterCheck.cpp.
|
override |
Definition at line 18 of file FloatLoopCounterCheck.cpp.