[PATCH] D60040: [clangd] Use capacity() instead of size() in RefSlab::bytes()
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 2 01:25:27 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL357454: [clangd] Use capacity() instead of size() in RefSlab::bytes() (authored by ibiryukov, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D60040?vs=192997&id=193241#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60040/new/
https://reviews.llvm.org/D60040
Files:
clang-tools-extra/trunk/clangd/index/Ref.h
Index: clang-tools-extra/trunk/clangd/index/Ref.h
===================================================================
--- clang-tools-extra/trunk/clangd/index/Ref.h
+++ clang-tools-extra/trunk/clangd/index/Ref.h
@@ -86,7 +86,7 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60040.193241.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190402/ffcc6974/attachment.bin>
More information about the cfe-commits
mailing list