summaryrefslogtreecommitdiffstats
path: root/clangd/GlobalCompilationDatabase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Simplify GlobalCompilationDatabase, cache missing GCDsSam McCall2017-12-221-45/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321350 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Implemented logging using ContextIlya Biryukov2017-12-131-6/+11
| | | | | | | | | | | | Reviewers: sammccall, ioeric, hokein Reviewed By: sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D40486 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@320576 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] GlobalCompilationDatabase interface changesSam McCall2017-12-041-35/+40
| | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@319647 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Remove no-op -fsyntax-only from fallback command. NFCSam McCall2017-12-011-1/+1
| | | | | | | This has no effect because we explicitly choose our actions. (If it had an effect, we'd want to add it to commands we get from a CDB) git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@319546 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Logger implicitly adds newlineSam McCall2017-11-301-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@319497 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Revert broken r318329 and disable tests on PS4Sam McCall2017-11-151-5/+1
| | | | | | (Clearly this is not a permanent solution) git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@318337 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Fix flag name from r318327Sam McCall2017-11-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@318329 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Try to unbreak tests on PS4 by targeting PC explicitlySam McCall2017-11-151-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@318327 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Fix compilation database detectionSam McCall2017-11-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@317838 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] clang-format the source code. NFC.Ilya Biryukov2017-10-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@315317 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Command line arg to specify compile_commands.json pathIlya Biryukov2017-10-021-16/+36
| | | | | | | | | | Summary: Adds compileCommands command line argument to specify an absolute path directly to the requested compile_commands.json for flags. Reviewed By: ilya-biryukov Differential Revision: https://reviews.llvm.org/D37150 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@314678 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Introduced Logger interface.Ilya Biryukov2017-09-201-12/+10
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@313730 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Add support for per-file extra flagsKrasimir Georgiev2017-07-061-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@307241 91177308-0d34-0410-b5e6-96231b3b80d8
* Restored r303067 and fixed failing test.Ilya Biryukov2017-05-161-0/+65
| | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@303151 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[ClangD] Refactor clangd into separate components"Adam Nemet2017-05-151-65/+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. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@303094 91177308-0d34-0410-b5e6-96231b3b80d8
* [ClangD] Refactor clangd into separate componentsIlya Biryukov2017-05-151-0/+65
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@303067 91177308-0d34-0410-b5e6-96231b3b80d8