xref: /llvm-project/clang-tools-extra/docs/clang-tidy/checks/cert/msc50-cpp.rst (revision 6e566bc5523f743bc34a7e26f050f1f2b4d699a8)
1.. title:: clang-tidy - cert-msc50-cpp
2
3cert-msc50-cpp
4==============
5
6Pseudorandom number generators use mathematical algorithms to produce a sequence
7of numbers with good statistical properties, but the numbers produced are not
8genuinely random. The ``std::rand()`` function takes a seed (number), runs a
9mathematical operation on it and returns the result. By manipulating the seed
10the result can be predictable. This check warns for the usage of
11``std::rand()``.
12