[PATCH] D44143: [clang-tidy] Create properly seeded random generator check
    Borsik Gábor via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Mar 12 12:45:08 PDT 2018
    
    
  
boga95 added a subscriber: szepet.
boga95 marked 4 inline comments as done.
boga95 added inline comments.
================
Comment at: test/clang-tidy/cert-properly-seeded-random-generator.cpp:76
+  // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: random number generator must be seeded with a random_device instead of a constant [cert-properly-seeded-random-generator]
+  engine1.seed(seed);
+  // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: random number generator must be seeded with a random_device instead of a constant [cert-properly-seeded-random-generator]
----------------
Quuxplusone wrote:
> Is the diagnostic suppressed if `seed` is a template parameter? (Not that I'd do this. It's just a corner case I thought of.)
Hopefully, it is not suppressed.
Repository:
  rCTE Clang Tools Extra
https://reviews.llvm.org/D44143
    
    
More information about the cfe-commits
mailing list