Commit Graph

39 Commits

Author SHA1 Message Date
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
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
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
8a7dfb017f Validate no files are consumed by import pipeline 2018-01-06 20:27:50 -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
71591d7805 Index_Request::contents is no longer optional 2017-12-29 12:00:52 -06:00
Jacob Dufault
48f3c75053 Add using declaration to optional.h, include STL optional if available or fallback to third-party one. 2017-12-29 12:00:52 -06: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
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
Fangrui Song
479c0c59bc More idiomatic 2017-12-10 19:53:17 -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
Fangrui Song
eac644d81a On *nix, use a realpath(3) variant (which does not expand symlinks) in NormalizePath
Before this commit, when a source file is a symlink, cquery is not able to serve LSP requests for it.
2017-11-30 11:27:26 -08:00
Jacob Dufault
a155f5b686 Fix a bunch of bugs in argument handling and address some TODOs 2017-10-18 01:24:52 -07:00
Jacob Dufault
f5314b62b1 Reformat to Chromium style. 2017-09-21 18:14:57 -07:00
Jacob Dufault
d6a8071da4 Be more aggressive about only indexing files once.
This should help fix perf regressions with long import times after syncing.
2017-09-13 23:39:32 -07:00
Jacob Dufault
14009293ba Fix IPC message e2e hiding 2017-06-13 23:59:40 -07:00
Jacob Dufault
d834d4db08 Provide code action to auto-implement methods (useful for classes or function declarations). 2017-05-29 14:18:35 -07:00
Jacob Dufault
32940e2c88 Experiment with caching CXIndex across multiple sessions 2017-05-24 19:04:19 -07:00
Jacob Dufault
1598129d8b Fix file finding on windows when path case changes. 2017-05-22 00:14:11 -07:00
Jacob Dufault
864ff122d8 Scan include directories for include completion candidates. 2017-05-21 12:51:15 -07:00
Jacob Dufault
9ae526089a Fix removing entries from querydb.
I expect this will resolve most of the issues with the index getting messed up when actively editing a file.
2017-05-20 00:33:11 -07:00
Jacob Dufault
cf45c91bcd A bit more work on making a faster compile_commands.json loader 2017-05-18 18:14:53 -07:00
Jacob Dufault
629876007e Fix clang compile 2017-05-08 18:21:21 -07:00
Jacob Dufault
49c687663e Rework some of the command line flag parsing logic. Hopefully make it more robust. 2017-04-25 21:03:22 -07:00
Jacob Dufault
91b5614c7e Optimize import pipeline.
Previous implementation was slower at reindexing if loading from cache because primary cc files would be reindexed for every dependency that changed.
2017-04-23 18:01:51 -07:00
Jacob Dufault
7f4d902dcf Add alternative compile_commands.json loader using rapidjson.
It may be faster than clang. I haven't tested it yet.
2017-04-17 00:06:01 -07:00
Jacob Dufault
04a855ebc7 Much better algorithm to sync code lens index locations to the right buffer location 2017-04-16 01:09:12 -07:00
Jacob Dufault
07c984d6c7 - Add type information to qualified_name, remove hover.
- Allow tests to automatically update their expecatations
2017-04-14 21:53:10 -07:00
Jacob Dufault
8f1e517c0a Small tweaks 2017-04-14 15:30:33 -07:00
Jacob Dufault
d5e5d96a9e - Slightly more robust file parsing
- Make memory ownership slightly clearer in indexer
2017-04-12 23:01:42 -07:00
Jacob Dufault
215a9a80fb - Show code lens for calls to parent and derived methods
- Don't show local variables in global symbol search
2017-04-11 00:29:36 -07:00
Jacob Dufault
5ebf4551b1 remove UsrRef 2017-04-08 19:27:07 -07:00
Jacob Dufault
56f0b3a90a Auto-index header files 2017-04-08 15:54:36 -07:00
Jacob Dufault
5b734e4c64 code dedup 2017-03-30 21:15:42 -07:00
Jacob Dufault
c8afc0f022 more changes 2017-03-25 16:58:11 -07:00
Jacob Dufault
695048baa7 move code into src 2017-03-25 13:15:00 -07:00