xref: /llvm-project/clang-tools-extra/test/clang-tidy/checkers/cert/limited-randomness.c (revision 89a1d03e2b379e325daa5249411e414bbd995b5e)
1 // RUN: %check_clang_tidy %s cert-msc30-c %t
2 
3 extern int rand(void);
4 int nonrand(void);
5 
cTest(void)6 int cTest(void) {
7   int i = rand();
8   // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: rand() has limited randomness [cert-msc30-c]
9 
10   int k = nonrand();
11 
12   return 0;
13 }
14