Jacob Dufault
7f9f6e0c6b
Revert "Handle template <class T> class A; and attribute variable uses to specialized template if exists"
...
This reverts commit 8da62430e575022e206b66bad58b376002422f32.
2018-01-25 11:46:03 -08:00
Fangrui Song
684ad961ad
Handle template <class T> class A; and attribute variable uses to specialized template if exists
2018-01-25 01:13:07 -08:00
Fangrui Song
403c892838
--debug disables libclang crash recovery
2018-01-25 00:01:30 -08:00
Fangrui Song
db1f707027
Add --debug to disable libclang crash recovery
...
We can add more debug facility later.
2018-01-24 23:32:42 -08:00
Fangrui Song
706a3d0017
Attribute enum to its underlying type's uses
2018-01-24 21:55:59 -08:00
Fangrui Song
c4e8db2964
Index namespaces as Type
2018-01-24 00:57:50 -08:00
Fangrui Song
b4e1e4fd3a
Remove enableComments
, make index.comments
default to 2, and index builtin types
2018-01-23 22:56:13 -08:00
Fangrui Song
bc28bfef45
Cleanup
2018-01-20 22:55:29 -08:00
Fangrui Song
6acea187c7
Add initialization option index.builtin_types for indexing builtin types
...
Also deprecate enableComments in favor of index.comments
Make $cquery/vars work on variables (by obtaining their types first).
This is currently the only way to list instances of builtin types.
2018-01-20 22:46:03 -08:00
Fangrui Song
b5c9e22ad1
Explicitly use std::move to make clang 3.5 compile
2018-01-20 19:19:24 -08:00
Fangrui Song
a57798154d
Explicitly use std::move to make clang 3.5 compile
2018-01-20 17:59:43 -08:00
scturtle
b8a3e089ce
Response on index error. ( #319 )
2018-01-19 23:56:49 -08:00
Chao Shen
405fd56781
Crash Hotfix.
2018-01-18 08:24:10 -08:00
Chao Shen
3132572e72
Don't give up index files of headers if the .cc/.cpp file failed.
2018-01-17 21:24:32 -08:00
Fangrui Song
ca3784db03
Don't index initializer for lambda types
2018-01-17 21:02:09 -08:00
Fangrui Song
b5761b5980
Fix textDocument/definition on #include lines
2018-01-17 12:52:37 -08:00
Fangrui Song
6746883a3b
Better inside-out syntax recognizer
2018-01-17 00:29:32 -08:00
Fangrui Song
dd84a85b75
Filter out inside-out syntax and array types for variable hover
2018-01-17 00:17:04 -08:00
Fangrui Song
bf9150f58a
Index variable initializer
2018-01-16 20:30:45 -08:00
Fangrui Song
a52d4ac61d
Show enum constants as Foo::A = 0
2018-01-16 20:01:47 -08:00
Fangrui Song
7d7e238924
enum
2018-01-16 19:09:29 -08:00
Fangrui Song
0b3ab23b25
For const qualified types, index qualified names along with initializers
2018-01-16 18:26:11 -08:00
Fangrui Song
1388e5190d
Fix gcc compile error. #297
2018-01-15 08:58:08 -08:00
Jacob Dufault
e20a6e9790
Add siphash.h, HashUSR -> HashUsr
2018-01-14 13:18:12 -08:00
Fangrui Song
da2cbe4152
USR -> Usr
2018-01-13 00:10:39 -08:00
Fangrui Song
14a213d407
Change std::string USR to uint64_t pseudorandom function (SipHash 64-bit)
2018-01-12 23:47:24 -08:00
Jacob Dufault
786ac0bc4f
Merge FileContents and FileContentsWithOffsets.
...
Also try to more aggressively load FileContents when indexing to increase reliability.
2018-01-10 21:16:46 -08:00
Jacob Dufault
54394ed868
Format
2018-01-10 18:43:01 -08:00
Fangrui Song
0e5e2a6ca5
Fix build
2018-01-10 00:21:55 -08:00
Fangrui Song
0ef5aec3fc
Initial values of variables are useful. For now, enable it for const qualified types. Qualified names may also be useful but they can not be easily combined.
...
See #260
2018-01-08 00:20:40 -08:00
Fangrui Song
ce6087978f
Use cursor extents for non-type template parameters
2018-01-07 10:53:44 -08:00
Fangrui Song
332a3b5240
Serialize {type,func}->def.kind for semantic highlighting
2018-01-07 10:22:03 -08:00
Fangrui Song
34aac56ff0
Fix non-type template parameter
2018-01-07 01:19:57 -08:00
Fangrui Song
29345f067c
Set {func,type}->def.kind
2018-01-07 01:07:39 -08:00
Fangrui Song
9dc34103d8
[indexer] Add uses of types of (non-type template parameter)
2018-01-07 00:36:12 -08:00
Fangrui Song
5809d0c436
Make Serialize accept argument SerializeFormat format
...
Rename `const char* GetString()` to GetCString and add `std::string GetString()`
WIP on serializers/msgpack.h
2018-01-06 18:01:36 -08:00
Fangrui Song
007bc5362c
Fix null pointer dereference of param.primary_file
2018-01-06 14:47:24 -08:00
scturtle
991b27899f
Show error on include position. ( #243 )
2018-01-06 09:28:55 -08:00
Fangrui Song
516b94e982
Change VarClass::cls to ClangSymbolKind::kind
...
ClangSymbolKind is ported from clang::index::SymbolKind
2018-01-05 22:43:12 -08:00
Fangrui Song
5f8e1935a6
Use cursor extent instead of cursor spelling range for CXCursor_MemberRefExpr #174
...
Members of non-concrete template types do not have useful spelling ranges (likely unexposed).
C<int> f; f.x // .x produces a MemberRefExpr which has a spelling range of `x`.
C<T> e; e.x // .x produces a MemberRefExpr which has a spelling range of `e` (weird).
To make `e.x` (MemberRefExpr with empty spelling name) able to find
definition, We use cursor extent (larger than spelling range) `e.x`. It
would be better if we could restrict the ranges to `.x` or just `x`.
Nevertheless, larger ranges are less specific, and should do no harm
because they will be overriden by more specific variable references `e`.
2018-01-03 11:02:28 -08:00
Jacob Dufault
4514e2f9ce
Silence unhandled namespace declaration warnings
2018-01-03 08:05:52 -08:00
Fangrui Song
74be57c334
Set variable_type of lambda parameters
...
Now a lambda parameter is listed in $cquery/vars of its type
2018-01-03 00:00:03 -08:00
Fangrui Song
a63297b002
Add type names to non-type template parameters
2018-01-02 22:52:40 -08:00
Fangrui Song
0539e4249b
The Little Match Ray On New Year's Eve 2017
2018-01-01 00:06:25 -08:00
Fangrui Song
cef47b13f7
Remove ResolveSpelling
2017-12-31 23:34:00 -08:00
Fangrui Song
02246a5c4b
Add ClangCursor::get_spelling_range and change some ResolveSpelling calls to get_spelling_range
2017-12-31 23:27:33 -08:00
Fangrui Song
a6496a0f8f
[indexer] Add template parameters in parameter-list to their uses
and index template template parameters
2017-12-31 22:54:52 -08:00
Fangrui Song
77e9ea1b77
Use cursor extents for is_implicit
function calls
...
cursor extents have larger ranges and less specific, thus making
them overridable by more specific (with smaller range) symbols.
Thus we do not need to hide them in query.cc:BuildFileDef
For example, the left paren in `A a(3)` jumps to the constructor.
the left paren in `A a = f()` jumps to the copy/move constructor.
2017-12-30 15:42:08 -08:00
Fangrui Song
95126bff61
In detailed_name
, remove space between *
and name
2017-12-30 13:11:55 -08:00
Fangrui Song
11aa09fac2
Don't reject macro definitions in system headers
...
Before, an assert() macro expansion jumps to __assert_fail but not
assert. This is because OnIndexReference finds a reference to __assert_fail
but VisitMacroDefinitionAndExpansions rejects the expansion.
2017-12-29 19:18:42 -08:00