clang-tools 22.0.0git
|
Pseudorandom number generators are not genuinely random. More...
#include <LimitedRandomnessCheck.h>
Public Member Functions | |
LimitedRandomnessCheck (StringRef Name, ClangTidyContext *Context) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
Pseudorandom number generators are not genuinely random.
The result of the std::rand() function makes no guarantees as to the quality of the random sequence produced. This check warns for the usage of std::rand() function.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/cert/msc50-cpp.html
Definition at line 23 of file LimitedRandomnessCheck.h.
|
inline |
Definition at line 25 of file LimitedRandomnessCheck.h.
|
override |
Definition at line 24 of file LimitedRandomnessCheck.cpp.
|
override |
Definition at line 17 of file LimitedRandomnessCheck.cpp.