sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

LG, don't forget about the fuzzer!



================
Comment at: clang-tools-extra/clangd/index/dex/PostingList.cpp:41
            "Posting List iterator can't advance() at the end.");
-    ++Index;
+    if (++CurrentID == DecompressedChunk.end()) { // reached end of chunk
+      if (++CurrentChunk == Chunks.end())         // reached the end
----------------
just `++CurrentID; normalizeCursor();`


================
Comment at: clang-tools-extra/clangd/index/dex/PostingList.cpp:131
 
+static constexpr size_t BitsPerEncodingByte = 7;
+
----------------
this is used only in one place now, inline or use elsewhere


================
Comment at: clang-tools-extra/clangd/index/dex/PostingList.cpp:138
+  // Calculate number of bytes Delta encoding would take by rounding up number
+  // of meaningful bytes divided by Chunk::BitsPerEncodingByte.
+  unsigned Width = 1 + llvm::findLastSet(Delta) / 7;
----------------
meaningful *bits*

no need to say "dividing..." as it just echoes the code. "examining the 
meaningful bits"?


================
Comment at: clang-tools-extra/clangd/index/dex/PostingList.cpp:174
+  std::vector<Chunk> Result;
+  std::array<uint8_t, Chunk::PayloadSize> Payload;
+  Payload.fill(0);
----------------
unused


https://reviews.llvm.org/D52300



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to