Author: ibiryukov Date: Tue Apr 2 01:24:37 2019 New Revision: 357454 URL: http://llvm.org/viewvc/llvm-project?rev=357454&view=rev Log: [clangd] Use capacity() instead of size() in RefSlab::bytes()
Patch by Nathan Ridge. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60040 Modified: clang-tools-extra/trunk/clangd/index/Ref.h Modified: clang-tools-extra/trunk/clangd/index/Ref.h URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/Ref.h?rev=357454&r1=357453&r2=357454&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/index/Ref.h (original) +++ clang-tools-extra/trunk/clangd/index/Ref.h Tue Apr 2 01:24:37 2019 @@ -86,7 +86,7 @@ public: size_t bytes() const { return sizeof(*this) + Arena.getTotalMemory() + - sizeof(value_type) * Refs.size(); + sizeof(value_type) * Refs.capacity(); } /// RefSlab::Builder is a mutable container that can 'freeze' to RefSlab. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits