summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2019-04-02 08:24:37 +0000
committerIlya Biryukov <ibiryukov@google.com>2019-04-02 08:24:37 +0000
commitbea52e5289b9ec8b49304939c03ceac78fe6163f (patch)
tree97426e3c59cb4872317e0b424795aa5b70d04061
parent0657197588ffea508426de1e0c2afa65e76e24fa (diff)
downloadbcm5719-llvm-bea52e5289b9ec8b49304939c03ceac78fe6163f.tar.gz
bcm5719-llvm-bea52e5289b9ec8b49304939c03ceac78fe6163f.zip
[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
-rw-r--r--clang-tools-extra/clangd/index/Ref.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/index/Ref.h b/clang-tools-extra/clangd/index/Ref.h
index 389e276b382..4d6ae169693 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.
OpenPOWER on IntegriCloud