ilya-biryukov added a comment. Some drive-by NITS.
================ Comment at: clang-tools-extra/clangd/index/MemIndex.cpp:109 + std::lock_guard<std::mutex> Lock(Mutex); + + Bytes += Index.getMemorySize(); ---------------- Why not simply `return Index.getMemorySize()` under a lock? ================ Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:180 + { + std::lock_guard<std::mutex> Lock(Mutex); + ---------------- Maybe put a lock over all of the function and remove the unneeded compound statement? https://reviews.llvm.org/D51154 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits