Commit Graph

123 Commits

Author SHA1 Message Date
Fangrui Song
ba1ca37326 [indexer] Make $cquery/base find correct overriden functions (#169) 2017-12-20 23:18:48 -08:00
Fangrui Song
6aefa9b114 [indexer] Handle unnamed namespaces 2017-12-20 19:52:34 -08:00
Fangrui Song
ee78b527ae [indexer] Treat empty short_name as implicit call which should not be included in all_symbols
std::vector<int> a = f(); // besides f, there is an implicit move constructor vector(vector<T>&&)
We expect finding references on `f` takes us to `f`, not to `vector(vector<T>&&)`
2017-12-20 07:46:43 -08:00
Fangrui Song
cf4603c6fa Add FileContentsWithOffsets 2017-12-18 23:05:12 -08:00
Jacob Dufault
8098e4f01d Support multiple base functions. 2017-12-18 22:15:46 -08:00
Jacob Dufault
be961fc4f2 Add hover (instead of reusing detailed_name) 2017-12-18 21:20:00 -08:00
Fangrui Song
8897bcc54d [indexer] Display declaration line for typedef/using. fix #141
GetDocumentContentInRange calls clang_tokenize, which is not easy to
handle multi-line declarations. Only display declaration lines for
one-line `typedef`/`using` now.
2017-12-18 19:30:49 -08:00
Walter Erquinigo
cb098cbfc3 test 2017-12-18 16:26:58 -08:00
Walter Erquinigo
a6cb98945e Add obj-c support in the indexer 2017-12-18 16:26:58 -08:00
Fangrui Song
5600989a42 [indexer] Treat explicit destructor call as not is_implicit (#159)
Also fixed an unused warning.
2017-12-18 13:48:32 -08:00
Fangrui Song
9fd35db034 [indexer] Index references to system headers 2017-12-17 21:16:40 -08:00
Jacob Dufault
c0c3fc41a4 Do not emit an include in the indexer if we failed to resolve the file. Also add -resource-dir to tests. 2017-12-15 21:24:31 -08:00
Walter Erquinigo
5238c50027 objc 2017-12-15 12:02:32 -08:00
Fangrui Song
17cac3d30a [indexer] Change macro's IndexVar::def::detail_name to its approximate definition
For `#define foo 3`,
Before this commit, `detail_name` was `foo` (displayed for textDocument/hover reqeusts).
It is now shown as `#define foo 3`
2017-12-13 09:35:44 -08:00
Jacob Dufault
1467526bad Be less aggressive about indexing potential lambdas 2017-12-12 09:49:52 -08:00
Fangrui Song
17f23bf3bf In OnIndexDeclaration, get_type_description() may return the name of a typedef and there is no (, causing insert failing 2017-12-12 00:14:25 -08:00
Jacob Dufault
9b909b3a13 Move usr out of *Def and into Query*/Index* types.
I'd like to make the *Def structures optional in the future, and usr is always non-optional.
2017-12-11 23:57:44 -08:00
Jacob Dufault
2751f51956 Format 2017-12-11 21:21:03 -08:00
Fangrui Song
fb902a29b7 Add missing definition and reference info to lambda paramaters. fix #120 2017-12-11 21:06:55 -08:00
Fangrui Song
479c0c59bc More idiomatic 2017-12-10 19:53:17 -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
fa240e3132 Small code cleanup in src/indexer.cc. 2017-12-01 09:57:03 -08:00
Jacob Dufault
9b44bf7901 Run ./format.sh 2017-12-01 09:55:41 -08:00
Jacob Dufault
066166ba40 Add --clang-sanity-check.
Does a simple index test to verify expected libclang API behavior.
2017-12-01 09:46:40 -08:00
topisani
c4ada3e9df Don't highlight operators as functions (#104)
* Don't highlight operators as functions

* address comments
2017-12-01 17:08:19 +01:00
topisani
63d2b5fa10 nitpick fixing 2017-11-30 14:12:41 -08:00
topisani
4e153784f6 Index language as enum instead of string 2017-11-30 14:12:41 -08:00
topisani
e6bcd05a7e markdown compliant language identifiers 2017-11-30 14:12:41 -08:00
topisani
28ad5b1ed1 Index file language and send it on hover 2017-11-30 14:12:41 -08:00
Jacob Dufault
601af73ca9 Move all libclangmm/* files into src/* directory 2017-11-11 11:41:09 -08:00
Jacob Dufault
348b4a2e4e Move libclangmm/Cursor.* to clang_cursor.* 2017-11-11 11:31:05 -08:00
Jacob Dufault
9d376a47d5 Do not index is_constructor and parameter_type_descriptions. 2017-11-08 19:59:11 -08:00
Jacob Dufault
96894ae996 Index std::make_unique and similar functions as constructor calls. 2017-11-08 19:55:13 -08:00
Jacob Dufault
e7de24764e Increase indexed file version 2017-11-07 01:01:37 -08:00
Jacob Dufault
510594cdcd Add is_constructor to indexer 2017-11-07 01:00:59 -08:00
Jacob Dufault
9cb4008023 Index type description for function parameters. 2017-11-07 00:57:08 -08:00
Jacob Dufault
6d2af96c16 Remove TranslationUnit::document_cursor() 2017-11-04 16:11:52 -07:00
Jacob Dufault
7d549f3fdf Move libclangmm/Utility.h into clang_utils.h 2017-11-04 16:02:39 -07:00
Jacob Dufault
7734943620 Format all code in src/ 2017-10-31 12:49:19 -07:00
Jacob Dufault
3e9cffcc62 Cleanup clang::TranslationUnit API so callers have to handle failures. 2017-10-22 22:07:50 -07:00
Jacob Dufault
7531a0b4e5 Real-time indexing as you type. 2017-09-26 23:03:43 -07:00
Jacob Dufault
f5314b62b1 Reformat to Chromium style. 2017-09-21 18:14:57 -07:00
Jacob Dufault
d9143f065d Fix indexer crash when indexing MSVC STL. 2017-09-12 22:51:13 -07:00
Jacob Dufault
7901653698 Make sure file exists before importing it. 2017-08-15 22:39:50 -07:00
Jacob Dufault
7faedfdf00 Do not import empty dependencies 2017-08-15 20:28:52 -07:00
Jacob Dufault
3ab4d0455d Fix delta update.
Previous file was being loaded after the current file is written to disk.
2017-08-15 00:46:21 -07:00
Jacob Dufault
1f3f69b221 Reuse loaded file contents in indexer; clear large state before caching. 2017-07-30 11:31:41 -07:00
Jacob Dufault
ee20d79dcc wip 2017-07-29 21:24:02 -07:00
Jacob Dufault
00e452272f Do not use clang_Location_isInSystemHeader for diagnostics; causes crashes 2017-07-12 15:02:48 -07:00
Jacob Dufault
6ab8a27313 Mark macros in index. 2017-06-28 23:28:29 -07:00