[PATCH] D84717: [ADT][BitVector] Merge find_first_in() / find_first_unset_in()

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 21:45:39 PDT 2020


Meinersbur added a comment.

Could you add "NFC" in the title?



================
Comment at: llvm/include/llvm/ADT/BitVector.h:209
+  /// Returns -1 if all bits in the range are unset / set.
+  int find_first_in(unsigned Begin, unsigned End, bool set = true) const {
     assert(Begin <= End && End <= Size);
----------------
[style] Parameter names start with a capital letter.


================
Comment at: llvm/include/llvm/ADT/BitVector.h:216
+      BitWord Word = Bits[i];
+      return (set) ? Word : (~Word);
+    };
----------------
[style] Parentheses are redundant.

There only one call to it, why the lambda?


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

https://reviews.llvm.org/D84717



More information about the llvm-commits mailing list