Fangrui Song
d821ac34d8
Merge {timestamp_manager,iindexer}.{cc,h}; remove standard_includes.*; use last_write_time
2018-04-28 23:37:55 -07:00
Fangrui Song
6e68e9edbd
Simplify
2018-04-07 21:04:20 -07:00
Fangrui Song
992b3cce16
Use clang_File_tryGetRealPathName
2018-04-07 16:46:22 -07:00
Fangrui Song
46fc3b8323
.
2018-03-31 16:30:53 -07:00
Fangrui Song
9aca6119ed
.
2018-03-31 13:38:43 -07:00
Fangrui Song
233e377137
.
2018-03-31 11:27:28 -07:00
Fangrui Song
6c8fee4141
.
2018-03-31 09:47:27 -07:00
Fangrui Song
da649891ae
Resurrection of ccls
2018-03-30 22:02:26 -07:00
Fangrui Song
512cd8cbd3
Better textDocument/definition heuristic for T::name style dependent names
2018-03-29 22:36:54 -07:00
Fangrui Song
bee8bacefd
Speed up build
2018-02-23 18:24:54 -08:00
Jacob Dufault
01fe19f280
Format code
2018-02-21 23:34:32 -08:00
Fangrui Song
72e654ffed
Fix default -resource-dir when clang -print-resource-dir contains ..
...
Also makes textDocument/definition in comments takes scope resolution
into account, and use detailed names (for Func, without parameters) for workspace/symbol
2018-02-12 23:54:50 -08:00
Fangrui Song
55c7519e93
Move ImportOrUpdate and header cleanup
2018-02-06 21:27:07 -08:00
Riatre Foo
54c587a700
Look for .cquery in any directory above the source file in the hierarchy. ( #409 )
...
* Look for .cquery in any directory above the source file in the hierarchy.
Currently cquery only reads compiler arguments (.cquery) from project
root. Under some circumstances (e.g. remote compiling), generating a
compilation database with correct path in it is non-trivial, and
allowing per directory compile arguments usually helps.
* unused var buf
2018-02-03 13:16:38 -08:00
Riatre Foo
b145243a64
Fix #393 again. ( #402 )
...
28cd33e actually changed the behaviour of GetFilesInFolderHelper.
2018-02-02 10:51:14 -08:00
Fangrui Song
12e41c609e
Fix #393
2018-02-01 23:35:34 -08:00
Chao Shen
5b6945d909
Remove last CR.
2018-02-01 17:12:36 +08:00
Jacob Dufault
f6a2a55209
Import pipeline improvements
...
- Cache manager is created by request
- Index is always associated with its contents
- Reduced frequently of file reads
2018-01-29 21:34:36 -08:00
Jacob Dufault
a392301be3
Format
2018-01-29 16:27:43 -08:00
Jacob Dufault
e20a6e9790
Add siphash.h, HashUSR -> HashUsr
2018-01-14 13:18:12 -08:00
Fangrui Song
eec5c77d6a
Use Paul Heckel's diff algorithm to convert between buffer/index line number
2018-01-14 00:23:04 -08:00
Jacob Dufault
93ba0c532b
For completion, only tell clang about relevant dirty working files.
...
The heuristic may not be perfect, but it is probably good enough.
clang_codeCompleteAt seems to get slower as more and more CXUnsavedFile
instances are uploaded.
2018-01-12 09:39:05 -08:00
Fangrui Song
6fb1798692
Use @ as escape character of cache filenames
...
Fixes #112
2018-01-10 23:57:42 -08:00
Jacob Dufault
54394ed868
Format
2018-01-10 18:43:01 -08:00
Jacob Dufault
5605dfbb00
Always normalize project file entry when passing it to clang.
...
This makes clang_codeCompleteAt much faster.
2018-01-10 18:33:36 -08:00
Joel Hock
9d64a76fec
fix logic in GetFilesInFolderHelper from DFS-ification in 96f4ffc4b
2018-01-08 19:38:37 -08:00
yshui
b644b54614
Convert GetFilesInFolderHelper to use BFS ( #268 )
...
This function has a huge stack frame (> 8k, thanks to tinydir), and is
called recursively. I have seen this function causing some stack
overflows. So convert it to BFS to avoid that.
2018-01-08 09:09:19 -08:00
Jacob Dufault
a4496b7430
Do not try to load compile_commands.json if there is a .cquery file.
...
Also give some better diagnostics for .cquery.
2018-01-06 20:27:50 -08:00
Jacob Dufault
bbe11e32eb
Prefer WriteToFile over manual std;:ofstream usage.
2018-01-05 10:02:53 -08:00
Jacob Dufault
327958dbe0
Log error instead of asserting if writing file fails.
...
Also remove some unused code.
2018-01-05 09:58:38 -08:00
Jacob Dufault
22ef88045f
Write cache to disk in binary format. Otherwise some escaping may occur.
2018-01-03 22:13:33 -08:00
Jacob Dufault
31c7fddf3d
More work to fix AppVeyor
2018-01-03 18:32:15 -08:00
Jacob Dufault
2a17f66792
Write test using binary, otherwise \n will become \r\n leading to double \r\r\n.
2018-01-03 18:12:39 -08:00
Chao Shen
d9b9e5e227
fix appveyor
2018-01-03 18:12:21 -08:00
Jacob Dufault
4aeb6acf04
Test improvements:
...
- Update files with \r\n newlines.
- Require clang 4.0.0 for running tests.
2017-12-23 07:51:34 -08:00
Jacob Dufault
e1ac3103a8
Add TEXT_REPLACE in index tests.
...
This allows USRs to vary across platforms in index tests, which is required to
make them pass on all platforms.
2017-12-22 08:48:12 -08:00
Jacob Dufault
e26f1caaba
Some changes to index tests:
...
- Add EXTRA_FLAGS: which lets a test specify additional command line
flags to pass to clang.
- Show diagnostics in the terminal after indexing the file.
- Allow the user to pass a test filter/file on the command line (ie,
cquery --test-index foo.cc)
2017-12-20 09:12:22 -08:00
Jacob Dufault
1fd50b4dea
Fix MSVC build.
2017-12-18 16:35:43 -08:00
Jacob Dufault
002d32c8a0
Fix broken auto-resource-dir detection
2017-12-18 11:47:58 -08:00
Jacob Dufault
d23de3a9fb
Move default resource directory computation to utils.
...
This will be used by the test system as well.
2017-12-15 21:18:49 -08:00
Jacob Dufault
9e6d33689f
Trim lines when reading from .cquery file.
...
Otherwise there may be newlines and the like.
2017-12-03 18:25:21 -08:00
Fangrui Song
697968b15f
Group cache files by projectRoot
2017-12-03 16:00:49 -08:00
Jacob Dufault
5d1fd4ce4d
Remove a bunch of std::cerr in favor of LOG_S
2017-12-01 17:04:39 -08:00
Jacob Dufault
76c07f3cc6
Additional improvements to automatic index test updates.
2017-11-29 19:09:11 -08:00
Jacob Dufault
f6f88cc788
Better logging in when iterating files.
2017-11-29 19:09:10 -08:00
Jacob Dufault
f84945fb51
Make SafeGetLine work the same across different file-ending styles.
2017-11-29 19:09:10 -08:00
Fangrui Song
dba27c3d34
Catch ios_base::failure exceptions in ReadContent
...
`filename` may be a directory (the latest Emacs lsp-mode sometimes sends a `textDocument/didOpen` message with an empty filename) or the file cannot be read.
2017-11-22 11:35:46 -05:00
Jacob Dufault
0376da015f
Try to always log when exiting.
2017-11-18 11:02:09 -08:00
Jacob Dufault
f698a3451f
Update comment in utils.cc
2017-10-24 18:28:23 -07:00
Jacob Dufault
a155f5b686
Fix a bunch of bugs in argument handling and address some TODOs
2017-10-18 01:24:52 -07:00