2017-05-23 18:17:48 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
Support
|
|
|
|
)
|
|
|
|
|
2017-05-23 16:12:45 +08:00
|
|
|
add_clang_library(clangDaemon
|
2018-03-09 22:00:34 +08:00
|
|
|
AST.cpp
|
2017-05-16 17:38:59 +08:00
|
|
|
ClangdLSPServer.cpp
|
|
|
|
ClangdServer.cpp
|
|
|
|
ClangdUnit.cpp
|
2017-12-04 21:49:59 +08:00
|
|
|
CodeComplete.cpp
|
2017-12-21 01:24:31 +08:00
|
|
|
CodeCompletionStrings.cpp
|
2018-01-25 22:19:21 +08:00
|
|
|
CompileArgsCache.cpp
|
2017-12-04 21:49:59 +08:00
|
|
|
Compiler.cpp
|
2018-01-25 22:19:21 +08:00
|
|
|
Context.cpp
|
2018-03-12 23:28:22 +08:00
|
|
|
Diagnostics.cpp
|
2017-05-16 17:38:59 +08:00
|
|
|
DraftStore.cpp
|
2017-12-02 01:08:02 +08:00
|
|
|
FuzzyMatch.cpp
|
2017-05-16 17:38:59 +08:00
|
|
|
GlobalCompilationDatabase.cpp
|
2018-02-16 22:15:55 +08:00
|
|
|
Headers.cpp
|
Adds a json::Expr type to represent intermediate JSON expressions.
Summary:
This form can be created with a nice clang-format-friendly literal syntax,
and gets escaping right. It knows how to call unparse() on our Protocol types.
All the places where we pass around JSON internally now use this type.
Object properties are sorted (stored as std::map) and so serialization is
canonicalized, with optional prettyprinting (triggered by a -pretty flag).
This makes the lit tests much nicer to read and somewhat nicer to debug.
(Unfortunately the completion tests use CHECK-DAG, which only has
line-granularity, so pretty-printing is disabled there. In future we
could make completion ordering deterministic, or switch to unittests).
Compared to the current approach, it has some efficiencies like avoiding copies
of string literals used as object keys, but is probably slower overall.
I think the code/test quality benefits are worth it.
This patch doesn't attempt to do anything about JSON *parsing*.
It takes direction from the proposal in this doc[1], but is limited in scope
and visibility, for now.
I am of half a mind just to use Expr as the target of a parser, and maybe do a
little string deduplication, but not bother with clever memory allocation.
That would be simple, and fast enough for clangd...
[1] https://docs.google.com/document/d/1OEF9IauWwNuSigZzvvbjc1cVS1uGHRyGTXaoy3DjqM4/edit
+cc d0k so he can tell me not to use std::map.
Reviewers: ioeric, malaperle
Subscribers: bkramer, ilya-biryukov, mgorny, klimek
Differential Revision: https://reviews.llvm.org/D39435
llvm-svn: 317486
2017-11-06 23:40:30 +08:00
|
|
|
JSONExpr.cpp
|
2017-11-24 21:13:41 +08:00
|
|
|
JSONRPCDispatcher.cpp
|
2017-09-20 15:24:15 +08:00
|
|
|
Logger.cpp
|
2017-02-07 18:28:20 +08:00
|
|
|
Protocol.cpp
|
|
|
|
ProtocolHandlers.cpp
|
2017-12-19 20:23:48 +08:00
|
|
|
SourceCode.cpp
|
2018-01-31 16:51:16 +08:00
|
|
|
Threading.cpp
|
2017-11-02 17:21:51 +08:00
|
|
|
Trace.cpp
|
2018-01-31 16:51:16 +08:00
|
|
|
TUScheduler.cpp
|
2018-01-22 19:48:20 +08:00
|
|
|
URI.cpp
|
2017-12-20 01:06:07 +08:00
|
|
|
XRefs.cpp
|
2018-02-16 22:15:55 +08:00
|
|
|
index/CanonicalIncludes.cpp
|
2017-12-15 20:25:02 +08:00
|
|
|
index/FileIndex.cpp
|
[clangd] Introduce a "Symbol" class.
Summary:
* The "Symbol" class represents a C++ symbol in the codebase, containing all the
information of a C++ symbol needed by clangd. clangd will use it in clangd's
AST/dynamic index and global/static index (code completion and code
navigation).
* The SymbolCollector (another IndexAction) will be used to recollect the
symbols when the source file is changed (for ASTIndex), or to generate
all C++ symbols for the whole project.
In the long term (when index-while-building is ready), clangd should share a
same "Symbol" structure and IndexAction with index-while-building, but
for now we want to have some stuff working in clangd.
Reviewers: ioeric, sammccall, ilya-biryukov, malaperle
Reviewed By: sammccall
Subscribers: malaperle, klimek, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D40897
llvm-svn: 320486
2017-12-12 23:42:10 +08:00
|
|
|
index/Index.cpp
|
2017-12-14 22:50:58 +08:00
|
|
|
index/MemIndex.cpp
|
2018-01-15 20:33:00 +08:00
|
|
|
index/Merge.cpp
|
[clangd] Introduce a "Symbol" class.
Summary:
* The "Symbol" class represents a C++ symbol in the codebase, containing all the
information of a C++ symbol needed by clangd. clangd will use it in clangd's
AST/dynamic index and global/static index (code completion and code
navigation).
* The SymbolCollector (another IndexAction) will be used to recollect the
symbols when the source file is changed (for ASTIndex), or to generate
all C++ symbols for the whole project.
In the long term (when index-while-building is ready), clangd should share a
same "Symbol" structure and IndexAction with index-while-building, but
for now we want to have some stuff working in clangd.
Reviewers: ioeric, sammccall, ilya-biryukov, malaperle
Reviewed By: sammccall
Subscribers: malaperle, klimek, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D40897
llvm-svn: 320486
2017-12-12 23:42:10 +08:00
|
|
|
index/SymbolCollector.cpp
|
2017-12-14 20:17:14 +08:00
|
|
|
index/SymbolYAML.cpp
|
2017-02-07 18:28:20 +08:00
|
|
|
|
2017-05-23 18:17:48 +08:00
|
|
|
LINK_LIBS
|
2017-05-23 21:59:37 +08:00
|
|
|
clangAST
|
2018-01-10 23:11:26 +08:00
|
|
|
clangASTMatchers
|
2017-02-07 18:28:20 +08:00
|
|
|
clangBasic
|
|
|
|
clangFormat
|
2017-02-15 23:04:20 +08:00
|
|
|
clangFrontend
|
2017-06-29 00:12:10 +08:00
|
|
|
clangIndex
|
2017-06-29 06:57:15 +08:00
|
|
|
clangLex
|
2017-04-05 03:42:29 +08:00
|
|
|
clangSema
|
2017-07-22 07:48:26 +08:00
|
|
|
clangSerialization
|
2017-02-15 23:04:20 +08:00
|
|
|
clangTooling
|
2017-03-02 00:23:40 +08:00
|
|
|
clangToolingCore
|
2017-11-09 19:30:04 +08:00
|
|
|
clangToolingRefactor
|
2017-05-23 18:29:54 +08:00
|
|
|
${LLVM_PTHREAD_LIB}
|
2017-02-07 18:28:20 +08:00
|
|
|
)
|
2017-05-23 16:12:45 +08:00
|
|
|
|
2017-10-26 18:03:11 +08:00
|
|
|
if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
|
|
|
|
add_subdirectory(fuzzer)
|
|
|
|
endif()
|
2017-05-23 16:12:45 +08:00
|
|
|
add_subdirectory(tool)
|
2017-12-22 22:38:05 +08:00
|
|
|
add_subdirectory(global-symbol-builder)
|