summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/ClangdUnitStore.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Resubmit "[clangd] The new threading implementation"Ilya Biryukov2018-02-081-37/+0
| | | | | | | | | | | Initially submitted as r324356 and reverted in r324386. This change additionally contains a fix to crashes of the buildbots. The source of the crash was undefined behaviour caused by std::future<> whose std::promise<> was destroyed without calling set_value(). llvm-svn: 324575
* Revert "[clangd] The new threading implementation" (r324356)Ilya Biryukov2018-02-061-0/+37
| | | | | | | | | | | | And the follow-up changes r324361 and r324363. These changes seem to break two buildbots: - http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/14091 - http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/16001 We will need to investigate what went wrong and resubmit the changes afterwards. llvm-svn: 324386
* [clangd] The new threading implementationIlya Biryukov2018-02-061-37/+0
| | | | | | | | | | | | | | | | | | Summary: In the new threading model clangd creates one thread per file to manage the AST and one thread to process each of the incoming requests. The number of actively running threads is bounded by the semaphore to avoid overloading the system. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, jkorous-apple, ioeric, hintonda, cfe-commits Differential Revision: https://reviews.llvm.org/D42573 llvm-svn: 324356
* [clangd] Provide a helper to report estimated memory usage per-fileIlya Biryukov2018-01-251-0/+10
| | | | | | | | | | | | Reviewers: sammccall, ioeric, hokein Reviewed By: ioeric Subscribers: klimek, cfe-commits, jkorous-apple Differential Revision: https://reviews.llvm.org/D42480 llvm-svn: 323425
* [clangd] Simplify code handling compile commandsIlya Biryukov2018-01-231-50/+0
| | | | | | | | | | | | | | | | Summary: CppFile can now change compilation arguments during rebuild. This allows simplifying code that manages CppFiles. Reviewers: sammccall, bkramer, jkorous-apple Reviewed By: sammccall Subscribers: ioeric, jkorous-apple, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42173 llvm-svn: 323204
* [clangd] Build dynamic index and use it for code completion.Eric Liu2017-12-191-3/+4
| | | | | | | | | | | | Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41289 llvm-svn: 321092
* [clangd] Implemented logging using ContextIlya Biryukov2017-12-131-6/+4
| | | | | | | | | | | | Reviewers: sammccall, ioeric, hokein Reviewed By: sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D40486 llvm-svn: 320576
* [clangd] GlobalCompilationDatabase interface changesSam McCall2017-12-041-7/+5
| | | | | | | | | | | | | | | | | | Summary: - GlobalCompilationDatabase now returns a single command (that's all we use) - fallback flags are now part of the GlobalCompilationDatabase. There's a default implementation that they can optionally customize. - this allows us to avoid invoking the fallback logic on two separate codepaths - race on extra flags fixed by locking the mutex - made GCD const-correct (DBGCD does have mutating methods) Reviewers: hokein Subscribers: klimek, cfe-commits, ilya-biryukov Differential Revision: https://reviews.llvm.org/D40733 llvm-svn: 319647
* [clangd] Use in-memory preambles in clangd.Ilya Biryukov2017-11-161-2/+5
| | | | | | | | | | | | Reviewers: klimek, bkramer, sammccall Reviewed By: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39843 llvm-svn: 318412
* [clangd] Fix clang-tidy warnings.Benjamin Kramer2017-10-281-2/+1
| | | | | | No functionality change intended. llvm-svn: 316832
* [clangd] Introduced Logger interface.Ilya Biryukov2017-09-201-3/+4
| | | | | | | | | | | | | | Summary: This fixes a bunch of logging-related FIXMEs. Reviewers: bkramer, krasimir, malaperle Reviewed By: malaperle Subscribers: malaperle, klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D37972 llvm-svn: 313730
* [clangd] Check if CompileCommand has changed on forceReparse.Ilya Biryukov2017-08-141-0/+36
| | | | | | | | | | | | Reviewers: krasimir, bkramer, klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36398 llvm-svn: 310819
* [clangd] Rewrote AST and Preamble management.Ilya Biryukov2017-08-011-6/+14
| | | | | | | | | | | | | | Summary: The new implementation allows code completion that never waits for AST. Reviewers: bkramer, krasimir, klimek Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36133 llvm-svn: 309696
* [clangd] Add support for per-file extra flagsKrasimir Georgiev2017-07-061-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the ability to specify user-defined extra flags per opened file through the LSP layer. This is a non-standard extension to the protocol. I've already created a feature request about it for upstream lsp: https://github.com/Microsoft/language-server-protocol/issues/255 The particular use-case is ycmd, which has a python script for figuring out extra flags per file: https://github.com/Valloric/ycmd#flagsforfile-filename-kwargs- Reviewers: ilya-biryukov, klimek, bkramer Reviewed By: ilya-biryukov Subscribers: cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D34947 llvm-svn: 307241
* Restored r303067 and fixed failing test.Ilya Biryukov2017-05-161-0/+34
| | | | | | | | | | | | | | | | | | | | | Summary: This commit restores r303067(reverted by r303094) and fixes the 'formatting.test' failure. The failure is due to destructors of `ClangdLSPServer`'s fields(`FixItsMap` and `FixItsMutex`) being called before destructor of `Server`. It led to the worker thread calling `consumeDiagnostics` after `FixItsMutex` and `FixItsMap` destructors were called. Also, clangd is now run with '-run-synchronously' flag in 'formatting.test'. Reviewers: bkramer, krasimir Reviewed By: krasimir Subscribers: mgorny, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D33233 llvm-svn: 303151
* Revert "[ClangD] Refactor clangd into separate components"Adam Nemet2017-05-151-34/+0
| | | | | | | | | | This reverts commit r303067. Caused http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/34305/ And even after Simon's fix there is still a test failure. llvm-svn: 303094
* [ClangD] Refactor clangd into separate componentsIlya Biryukov2017-05-151-0/+34
Summary: Major refactoring to split LSP implementation, Clang API calls and threading(mostly synchronization) Reviewers: bkramer, krasimir Reviewed By: bkramer Subscribers: cfe-commits, mgorny, klimek Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D33047 llvm-svn: 303067
OpenPOWER on IntegriCloud