From bea52e5289b9ec8b49304939c03ceac78fe6163f Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Tue, 2 Apr 2019 08:24:37 +0000 Subject: [PATCH] [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 llvm-svn: 357454 --- clang-tools-extra/clangd/index/Ref.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/clangd/index/Ref.h b/clang-tools-extra/clangd/index/Ref.h index 389e276..4d6ae16 100644 --- a/clang-tools-extra/clangd/index/Ref.h +++ b/clang-tools-extra/clangd/index/Ref.h @@ -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. -- 2.7.4