The RefSlab::size can easily cause confusions, it returns the number of
different symbols, rahter than the number of all references.
- add numRefs() method and cache it, since calculating it everytime is nontrivial.
- clear misused places.
Paths
| Differential D53389
[clangd] Clear the semantic of RefSlab::size. ClosedPublic Authored by hokein on Oct 18 2018, 2:50 AM.
Details Summary The RefSlab::size can easily cause confusions, it returns the number of
Diff Detail
Event TimelineHerald added subscribers: kadircet, arphaman, jkorous and 3 others. · View Herald TranscriptOct 18 2018, 2:50 AM Comment Actions Adding numRefs() and fixing occurrences makes sense. Comment Actions
OK, and I added a comment for this method to avoid future confusion. This revision is now accepted and ready to land.Oct 18 2018, 4:44 AM Closed by commit rCTE344745: [clangd] Clear the semantic of RefSlab::size. (authored by hokein). · Explain WhyOct 18 2018, 8:36 AM Closed by commit rL344745: [clangd] Clear the semantic of RefSlab::size. (authored by hokein). · Explain Why This revision was automatically updated to reflect the committed changes. This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 170095 clang-tools-extra/trunk/clangd/index/Background.cpp
clang-tools-extra/trunk/clangd/index/FileIndex.cpp
clang-tools-extra/trunk/clangd/index/Index.h
clang-tools-extra/trunk/clangd/index/Index.cpp
clang-tools-extra/trunk/clangd/index/Serialization.cpp
|