Commit Graph

6 Commits

Author SHA1 Message Date
Mikael Holmen e408b54290 [clangd] Fix gcc compiler warning by removing extra ";" [NFC]
gcc complained with:

/data/repo/master/clang-tools-extra/clangd/index/Ref.h:189:2: warning: extra ';' [-Wpedantic]
 }; // namespace llvm
  ^
2020-05-19 11:57:15 +02:00
Sam McCall d19265b31e [clangd] Avoid wasteful data structures in RefSlab::Builder
Summary: This is worth another 10% or so on InedxBenchmark.DexBuild.

Reviewers: kbobyrev

Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79950
2020-05-18 22:34:59 +02:00
Kirill Bobyrev a6860c1af4
[clangd] Add a flag for spelled references in the Index
This patch allows the index does to provide a way to distinguish
implicit references (e.g. coming from macro expansions) from the spelled
ones. The corresponding flag was added to RefKind and symbols that are
referenced without spelling their name explicitly are now marked
implicit. This allows fixing incorrect behavior when renaming a symbol
that was referenced in macro expansions would try to rename macro
invocations.

Differential Revision: D72746

Reviewed by: hokein
2020-02-06 08:18:14 +01:00
Ilya Biryukov bea52e5289 [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
2019-04-02 08:24:37 +00:00
Haojian Wu f334231176 [clangd] Deduplicate Refs on the fly.
Summary:
Currently, we only do deduplication when we flush final results. We may
have huge duplications (refs from headers) during the indexing period (running
clangd-indexer on Chromium).

With this change, clangd-indexer can index the whole chromium projects
(48 threads, 40 GB peak memory usage).

Reviewers: kadircet

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59092

llvm-svn: 355676
2019-03-08 09:26:30 +00:00
Dmitri Gribenko cb83ea6274 Moved Ref into its own header and implementation file
Reviewers: ioeric

Subscribers: mgorny, jkorous, mgrang, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D58778

llvm-svn: 355090
2019-02-28 13:49:25 +00:00