Fangrui Song
f1d9a93819
Support empty cacheDirectory and fix cache load
2019-11-09 19:58:32 -08: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
96e0f0fafa
clangIndex
2019-10-24 00:55:39 -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
a385bffcbd
Backport and cleanup
2019-10-23 21:56:51 -07:00
Fangrui Song
f73100adf3
Merge {timestamp_manager,iindexer}.{cc,h}; remove standard_includes.*; use last_write_time
2019-10-23 21:56:51 -07:00
Fangrui Song
5fb88749a9
Simplify Position & Range; prettify Maybe; remove file_contents.{h,cc}
2019-10-23 21:56:50 -07:00
Fangrui Song
b872faa160
Simplify
2019-10-23 21:56:50 -07:00
Fangrui Song
c96631d1ee
.
2019-10-23 21:56:50 -07:00
Fangrui Song
eb7d0951ce
.
2019-10-23 21:56:50 -07:00
Fangrui Song
22a7bcb47f
.
2019-10-23 21:56:50 -07:00
Fangrui Song
b839389f77
Resurrection of ccls
2019-10-23 21:56:50 -07:00
Fangrui Song
39dfe052f5
Better textDocument/definition heuristic for T::name style dependent names
2019-10-23 21:56:50 -07:00
Fangrui Song
640f548e7c
Use std::index_sequence and std::make_unique
2018-03-10 15:57:02 -08:00
Fangrui Song
bee8bacefd
Speed up build
2018-02-23 18:24:54 -08:00
Fangrui Song
b98c9a4575
Remove UniqueAdd* and uniquify uses
after libclang callbacks.
...
This removes some duplication in `uses`.
2018-02-23 15:08:19 -08:00
Jacob Dufault
01fe19f280
Format code
2018-02-21 23:34:32 -08:00
Fangrui Song
e440a7c52f
Convert some copy constructors to move constructors in query.cc
2018-02-06 21:45:58 -08:00
Fangrui Song
55c7519e93
Move ImportOrUpdate and header cleanup
2018-02-06 21:27:07 -08:00
Fangrui Song
0016d214c3
Convert copy constructor to move constructors piecemeal
...
If I replace all the important constructors used in query.cc, there will be a weird issue that strings following "Applying index update for " are empty.
2018-02-06 20:54:17 -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
Jacob Dufault
3058e15460
StringJoin can take a separator.
2018-01-17 21:29:40 -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
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