Commit Graph

21 Commits

Author SHA1 Message Date
Fangrui Song
79732bf375 Make -v=1 work and log cflags for SemaManager session and Indexer 2019-10-24 18:37:55 -07:00
Fangrui Song
1d7674bdfc Support multiple -init=
Initialization options are applied (deserialized to the same object) in the following order:

* "initializationOptions" from client
* first -init=
* second -init=
* ...

Scalar options will be overridden but arrays will get concatenated, e.g.

ccls -log-file=/dev/stderr -index . -init='{"clang":{"extraArgs":["-DA"]}}' -init='{"clang":{"extraArgs":["-DB"]}}'

results in clang.extraArgs: ["-DA", "-DB"]
2019-10-24 18:37:55 -07:00
Fangrui Song
cc11d30dad Refactor serializer
Delete virtual bases Reader & Writer
Delete unused MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY
Merge serializers/{json,binary}.hh into serializer.{hh,cc}
MAKE_REFLECT_STRUCT => REFLECT_STRUCT
MAKE_REFLECT_TYPE_PROXY => REFLECT_UNDERLYING
2019-10-24 18:37:55 -07:00
Fangrui Song
6517f9f143 Misc 2019-10-24 18:37:54 -07:00
Fangrui Song
e3a2f1a9a8 *.h -> *.hh 2019-10-24 18:37:54 -07:00
Fangrui Song
67eb1e6b23 Refactor message handler and namespace ccls 2019-10-24 18:37:53 -07:00
Fangrui Song
6ce79155a9 Add command line option -index=root to index without starting language server 2019-10-24 18:37:35 -07:00
Fangrui Song
8fea558f95 Misc changes to project
* Better LanguageId detection with clangDriver (e.g. .cu -> types::TY_CUDA)
* fallback when there is no .ccls or compile_commands.json

Also Hide clangTooling options from --help
2019-10-24 18:37:35 -07:00
Fangrui Song
f737ac31db Clean 2019-10-24 18:37:35 -07:00
Fangrui Song
395e9d8724 Misc
Move using below #include to make preamble happy
textDocument/references: if no references, first line or last line => list where this file is included
malloc_trim() only if files have been indexed in last cycle
Intern: use CachedHashStringRef
2019-10-24 18:37:35 -07:00
Fangrui Song
27a5b24b59 Add license notice 2019-10-24 01:01:21 -07:00
Fangrui Song
39787d2851 clang-format
DEF CON 26 CTF
2019-10-24 01:01:21 -07:00
Fangrui Song
af77e6615d CrashRecoveryContext 2019-10-24 01:01:20 -07:00
Fangrui Song
32dad17e81 Remove submodule doctest 2019-10-24 01:01:20 -07:00
Fangrui Song
8e4d62212b Misc changes to clangIndex 2019-10-24 01:00:37 -07:00
Fangrui Song
103aa711d3 First draft: replace libclang indexer with clangIndex 2019-10-24 00:53:16 -07:00
Fangrui Song
7198db1777 Use ChangeStd{in,out}ToBinary 2019-10-24 00:17:28 -07:00
Fangrui Song
34dc1e93e9 Remove WithFileContent & lex_utils.{cc,h} 2019-10-24 00:17:28 -07:00
Fangrui Song
a962061698 Simplify pipeline 2019-10-23 21:56:51 -07:00
Fangrui Song
cf0d16fa0c Replace loguru with a custom logger 2019-10-23 21:56:51 -07:00
Fangrui Song
c81ca26a2e Use llvm::cl and simplify main.cc import_pipeline.cc 2019-10-23 21:56:51 -07:00