Commit Graph

7 Commits

Author SHA1 Message Date
Benjamin Kramer f86708dbf5 [clangd] Strip file:// from the URI when calling formatting.
It confuses FileManager on windows.

llvm-svn: 294314
2017-02-07 16:10:17 +00:00
Benjamin Kramer d115a574b5 [clangd] Ignore comments in clangd input, so we can write tests without sed.
Another attempt on making this work on windows.

llvm-svn: 294312
2017-02-07 15:37:17 +00:00
Benjamin Kramer 81f91c1777 [clangd] Fix subtle use after return.
I didn't find this because my main development machine still happens to
use libstdc++ with the broken C++11 ABI, which has a global empty
string.

llvm-svn: 294309
2017-02-07 14:35:09 +00:00
Benjamin Kramer 6a3d74eb50 [clangd] Set stdin to binary to fix tests on windows.
llvm-svn: 294297
2017-02-07 12:40:59 +00:00
Benjamin Kramer d588b0f525 [clangd] Harden test against sed implementations that strip \r.
Also clean up logging and don't print \0.

llvm-svn: 294294
2017-02-07 11:49:03 +00:00
Benjamin Kramer 59542bb08a [clangd] Add missing include.
llvm-svn: 294292
2017-02-07 10:47:40 +00:00
Benjamin Kramer bb1cdb63e5 Add a prototype for clangd
clangd is a language server protocol implementation based on clang. It's
supposed to provide editor integration while not suffering from the
confined ABI of libclang.

This implementation is limited to the bare minimum functionality of
doing (whole-document) formatting and rangeFormatting. The JSON parsing
is based on LLVM's YAMLParser but yet most of the code of clangd is
currently dealing with JSON serialization and deserialization.

This was only tested with VS Code so far, mileage with other LSP clients
may vary.

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

llvm-svn: 294291
2017-02-07 10:28:20 +00:00