[PATCH] D59254: [RFC] Implementation of Clang randstruct
Peter Collingbourne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 12 13:57:02 PDT 2019
pcc added a comment.
This needs a test under `test/CodeGen` at least.
================
Comment at: clang/include/clang/AST/RecordFieldReorganizer.h:54
+ std::seed_seq Seq;
+ std::default_random_engine rng;
+};
----------------
I don't think we can use `default_random_engine` for this because the behaviour would need to be consistent between C++ standard library implementations, and the behaviour of `default_random_engine` is implementation defined. Similarly, I don't think that we can use `std::shuffle` (see note in https://en.cppreference.com/w/cpp/algorithm/random_shuffle ).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59254/new/
https://reviews.llvm.org/D59254
More information about the cfe-commits
mailing list