[PATCH] D113213: [NFC] Move CombinationGenerator from Exegesis to ADT

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 5 01:55:49 PDT 2021


courbet accepted this revision.
courbet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/include/llvm/ADT/CombinationGenerator.h:15-16
+///
+/// It is important to think of input as vector-of-vectors, where the
+/// outer vector is the variable space, and inner vector is choice space.
+/// The number of choices for each variable can be different.
----------------
I'm not sure this is very relevant here.


================
Comment at: llvm/include/llvm/ADT/CombinationGenerator.h:52
+    // Returns whether the wrap happened.
+    bool operator++() {
+      ++Position;
----------------
[nit] this does not have the semantics of `operator++`. Rename this to `next()` ?


================
Comment at: llvm/include/llvm/ADT/CombinationGenerator.h:61
+    // Get the value at which we are currently pointing.
+    operator const value_type &() const { return *Position; }
+
----------------
I think this would be better as `operator*`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113213/new/

https://reviews.llvm.org/D113213



More information about the llvm-commits mailing list