[PATCH] D60779: [ADT] llvm::bsearch, binary search for mere mortals

Ilya Biryukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 09:20:03 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: include/llvm/ADT/STLExtras.h:1317
+  while (Lo != Hi) {
+    unsigned Mid = Lo + ((Hi - Lo) >> 1);
+    if (P(Mid))
----------------
Maybe use `/2` instead of `>>1`?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60779





More information about the llvm-commits mailing list