summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/index/Background.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] Store source file hash in IndexFile{In,Out}Kadir Cetinkaya2018-11-191-0/+1
| | | | | | | | | | | | | | Summary: Puts the digest of the source file that generated the index into serialized index and stores them back on load, if exists. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54693 llvm-svn: 347235
* [clangd] Fix a compiler warning and test crashes caused in rL347038.Haojian Wu2018-11-161-1/+1
| | | | llvm-svn: 347039
* Introduce shard storage to auto-index.Kadir Cetinkaya2018-11-161-20/+45
| | | | | | | | | | | | Reviewers: sammccall, ioeric Reviewed By: sammccall Subscribers: llvm-commits, mgorny, Eugene.Zelenko, ilya-biryukov, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54269 llvm-svn: 347038
* Revert "Introduce shard storage to auto-index."Kadir Cetinkaya2018-11-151-120/+24
| | | | | | This reverts commit 6dd1f24aead10a8d375d0311001987198d26e900. llvm-svn: 346945
* Revert "clang-format"Kadir Cetinkaya2018-11-151-2/+2
| | | | | | This reverts commit 0a37e9c3d88a2e21863657df2f7735fb7e5f746e. llvm-svn: 346944
* Revert "Address comments"Kadir Cetinkaya2018-11-151-130/+96
| | | | | | This reverts commit 19a39b14eab2b5339325e276262b177357d6b412. llvm-svn: 346943
* Revert "Address comments."Kadir Cetinkaya2018-11-151-53/+80
| | | | | | This reverts commit b43c4d1c731e07172a382567f3146b3c461c5b69. llvm-svn: 346942
* Address comments.Kadir Cetinkaya2018-11-151-80/+53
| | | | llvm-svn: 346941
* Address commentsKadir Cetinkaya2018-11-151-96/+130
| | | | llvm-svn: 346940
* clang-formatKadir Cetinkaya2018-11-151-2/+2
| | | | llvm-svn: 346939
* Introduce shard storage to auto-index.Kadir Cetinkaya2018-11-151-24/+120
| | | | | | | | | | Reviewers: sammccall, ioeric Subscribers: ilya-biryukov, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54269 llvm-svn: 346938
* [clangd] auto-index stores symbols per-file instead of per-TU.Eric Liu2018-11-061-12/+168
| | | | | | | | | | | | | | | | | Summary: This allows us to deduplicate header symbols across TUs. File digests are collects when collecting symbols/refs. And the index store deduplicates file symbols based on the file digest. Reviewers: sammccall, hokein Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53433 llvm-svn: 346221
* [clangd] Use thread pool for background indexing.Kadir Cetinkaya2018-10-301-4/+17
| | | | | | | | | | | | Reviewers: sammccall, ioeric Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D53651 llvm-svn: 345590
* [clangd] Support URISchemes configuration in BackgroundIndex.Eric Liu2018-10-221-3/+4
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53503 llvm-svn: 344912
* [clangd] Namespace style cleanup in cpp files. NFC.Sam McCall2018-10-201-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Standardize on the most common namespace setup in our *.cpp files: using namespace llvm; namespace clang { namespace clangd { void foo(StringRef) { ... } And remove redundant llvm:: qualifiers. (Except for cases like make_unique where this causes problems with std:: and ADL). This choice is pretty arbitrary, but some broad consistency is nice. This is going to conflict with everything. Sorry :-/ Squash the other configurations: A) using namespace llvm; using namespace clang; using namespace clangd; void clangd::foo(StringRef); This is in some of the older files. (It prevents accidentally defining a new function instead of one in the header file, for what that's worth). B) namespace clang { namespace clangd { void foo(llvm::StringRef) { ... } This is fine, but in practice the using directive often gets added over time. C) namespace clang { namespace clangd { using namespace llvm; // inside the namespace This was pretty common, but is a bit misleading: name lookup preferrs clang::clangd::foo > clang::foo > llvm:: foo (no matter where the using directive is). llvm-svn: 344850
* [clangd] Clear the semantic of RefSlab::size.Haojian Wu2018-10-181-2/+2
| | | | | | | | | | | | | | | | | Summary: 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. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53389 llvm-svn: 344745
* [clangd] Fix threading bugs in (not-yet-used) BackgroundIndex, re-enable test.Sam McCall2018-10-161-2/+5
| | | | | | | | | | | | | | | | | | | Summary: One relatively boring bug: forgot to notify the CV after enqueue. One much more fun bug: the thread member could access instance variables before they were initialized. Although the thread was last in the init list, QueueCV etc were listed after Thread in the class, so their default constructors raced with the thread itself. We have to get very unlucky to lose this race, I saw it 0.02% of the time. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D53313 llvm-svn: 344595
* [clangd] Optionally use dex for the preamble parts of the dynamic index.Sam McCall2018-10-161-1/+1
| | | | | | | | | | | | | | | Summary: Reuse the old -use-dex-index experiment flag for this. To avoid breaking the tests, make Dex deduplicate symbols, addressing an old FIXME. Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53288 llvm-svn: 344594
* [clangd] Minimal implementation of automatic static index (not enabled).Sam McCall2018-10-151-0/+191
Summary: See tinyurl.com/clangd-automatic-index for design and goals. Lots of limitations to keep this patch smallish, TODOs everywhere: - no serialization to disk - no changes to dynamic index, which now has a much simpler job - no partitioning of symbols by file to avoid duplication of header symbols - no reindexing of edited files - only a single worker thread - compilation database is slurped synchronously (doesn't scale) - uses memindex, rebuilds after every file (should be dex, periodically) It's not hooked up to ClangdServer/ClangdLSPServer yet: the layering isn't clear (it should really be in ClangdServer, but ClangdLSPServer has all the CDB interactions). Reviewers: ioeric Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D53032 llvm-svn: 344513
OpenPOWER on IntegriCloud