Fangrui Song
5763201838
Remove is_type_member & VarDefDefinitionData::declaring_type
...
Rename ClangStorageClass to StorageClass
Add semantic_parent & semantic_parent_kind (but not serialized yet)
Move query.h SymbolKind to indexer.h SymbolKind and make it uint8_t
2018-01-27 20:46:06 -08:00
Fangrui Song
aeb63ce3ad
Add magic/version to "cacheFormat": "msgpack"
2018-01-27 19:21:35 -08:00
Fangrui Song
d605217c1a
matcher.cc: use std::regex_search instead of std::regex_match
...
Prototype of non-working `dependencies` parameter of $cquery/freshenIndex
2018-01-27 10:42:18 -08:00
Jacob Dufault
e3d3a492d0
Return default value
2018-01-27 10:20:54 -08:00
Phil Wise
74a39e7ea8
Fix build on Ubuntu 16.04
...
On Ubuntu 16.04 I get the following compile error in release mode:
../../src/indexer.cc: In function ‘ClangStorageClass {anonymous}::GetStorageClass(CX_StorageClass)’:
../../src/indexer.cc:130:1: error: control reaches end of non-void function [-Werror=return-type]
cc1plus: all warnings being treated as errors
2018-01-27 09:03:08 -08:00
Fangrui Song
d6003e1991
workspace/didChangeWatchedFiles
2018-01-26 23:17:49 -08:00
Fangrui Song
0bbabbcbd2
Move IndexVar::def::declarations to IndexVar::declarations
2018-01-26 21:50:17 -08:00
Fangrui Song
e892c23955
Change declaration to declarations in IndexVar
2018-01-26 18:21:15 -08:00
Fangrui Song
6b3673a438
Remove definition_spelling from uses in IndexVar
...
Instead, specify `include_decl = true` in GetUsesOfSymbol
2018-01-26 18:01:14 -08:00
Fangrui Song
37809def7c
Add bool include_decl
parameter to GetUsesOfSymbol
...
Fixes #350
Function declarations/definitions are not counted if include_decl is
false.
We should do similar thing to Var and Type.
2018-01-26 17:31:50 -08:00
Fangrui Song
723c78409f
Move is_operator from indexer to semantic highlighting
2018-01-26 10:08:56 -08:00
Fangrui Song
351e7b6c95
Add ClangStorageClass storage; to {Func,Var}DefDefinitionData and semantic highlighting.
...
This can be used to differentiate local/global variables, template parameters.
Also make msgpack deserialization robust.
2018-01-26 09:47:42 -08:00
Fangrui Song
3ef0abec14
WIP DidChangeWatchedFiles
2018-01-25 23:04:07 -08:00
Fangrui Song
1aec53621f
Use std::vector<std::string> files_removed;
...
It turns out this field is not used.
2018-01-25 22:42:58 -08:00
Fangrui Song
50c6ed1dd3
Clean up SetTypeName
2018-01-25 22:25:19 -08:00
Fangrui Song
63b793619d
Set names in ResolveToDeclarationType and type declarations.
2018-01-25 21:38:39 -08:00
Fangrui Song
7aea052f09
Re-pick "Handle template <class T> class A" but does not assign names to templates without body
2018-01-25 12:35:59 -08:00
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
Jacob Dufault
d14f17212d
Do not show code lens on namespaces.
...
There are too many references for editors to handle well.
2018-01-25 11:22:55 -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
d2c4c34bc0
Replace std::cin.get with getchar. Fix #334
...
To avoid C++ iostream headache:
std::cin has a bad() state
std::{cin,cout} are also tied by default, reading from cin will cause a flush of cout, which may deadlock
2018-01-24 21:32:07 -08:00
Jacob Dufault
61efdcc721
Better inline code lens location for functions
2018-01-24 19:15:18 -08:00
Jacob Dufault
3f4866208f
Fix unit tests properly
2018-01-24 10:42:09 -08:00
Fangrui Song
549f4f3674
Fix --test-unit
2018-01-24 10:26:01 -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
Jan Niklas Hasse
358c001d3c
Don't use MSVC specific exception handler for MinGW
2018-01-23 10:01:10 -08:00
Fangrui Song
8ef2b95a45
Fix lsDocumentUri::GetPath on Windows
2018-01-23 09:02:36 -08:00
Fangrui Song
ce49a5c8d9
Stop appending to insert
after a placeholder if snippetSupport is false
2018-01-22 22:21:32 -08:00
Fangrui Song
d4a4e15976
Store client capability snippetSupport into config
...
Rename filterAndSortCompletionResponse to completion.filterAndSort
Rename index.builtin_types to index.buitinTypes
2018-01-21 10:09:09 -08:00
Snibod
69d439ae8d
Detect Windows absolute paths in LoadCompilationEntriesFromDirectory
2018-01-21 07:44:35 -08:00
Fangrui Song
e4d4c7b139
Better $cquery/vars
2018-01-20 23:42:11 -08:00
Fangrui Song
bf7ffb3c9d
Strip CXType_RValueReference
2018-01-20 23:12:23 -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
scturtle
619ad11f9e
Let GetExecutablePath()
return real path on osx. ( #325 )
2018-01-20 20:37:24 -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
Fangrui Song
8c6a87b3a3
Fix signatureHelp signature selection heuristic
2018-01-20 16:21:13 -08:00
Fangrui Song
c36eda70f9
Rename SubstringMatch to SubsequenceMatch and use it to pre-filter completion items
...
Fix #321
2018-01-20 13:15:43 -08:00
Fangrui Song
2e0f14bef8
Add whitelist/blacklist to $cquery/freshenIndex
2018-01-20 11:39:44 -08:00
Fangrui Song
273af8306f
Move GetQueryFileIdFromPath to unnamed namespace, make them inline and optional
2018-01-20 10:44:30 -08:00
Fangrui Song
76c38787df
CXCursor_OverloadCandidate is lsCompletionItemKind::Text
...
See clang/test/Index for some OverloadCandidate cases, they all start with Text.
2018-01-20 10:07:52 -08:00
Fangrui Song
c5bb14e86b
Use INVALID_ID instead of optional and clean up
2018-01-20 09:59:12 -08:00
Ka Ho Ng
b6539a2639
Add INVALID_ID as a constant for Id class Template
...
This is for identifying invalid ID from normal ID.
2018-01-20 09:38:19 -08:00
khng300
427f7b79e3
Use GetQuery{Type,Func,Var}IdFromUsr for querying QueryDatabase::usr_to_{type,func_var} ( #315 )
...
* Use GetQuery{Type,Func,Var}IdFromUsr for querying usr_to_{type,func_var}
Instead of directly touching usr_to_{type,func_var}, use dedicated
methods to touch them for more abstraction around QueryDatabase.
* Use `Usr` as parameter for GetQueryVarIdFromUsr()
To maintain code consistency with other similar helpers.
2018-01-20 08:57:41 -08:00
scturtle
b8a3e089ce
Response on index error. ( #319 )
2018-01-19 23:56:49 -08:00
Fangrui Song
57e95590e8
Remove GetIndexPosFromBufferPos range check
2018-01-19 23:23:52 -08:00
Fangrui Song
6c45663002
Support #include for textDocument/references
2018-01-19 21:11:03 -08:00
Fangrui Song
b305beb419
Address nitpicking
2018-01-19 19:05:26 -08:00
Fangrui Song
8f41aa72de
Better error reporting in ResponseMessage
2018-01-19 15:33:32 -08:00
Fangrui Song
90c2a54bbc
Better error reporting in ResponseMessage. Fix #317
2018-01-19 14:31:49 -08:00
Fangrui Song
8eff5e2e4f
Add BaseIpcMessage::GetRequestId
2018-01-19 10:00:06 -08:00
Fangrui Song
5c43bd9a09
Remove IpcMessage
2018-01-19 01:06:02 -08:00
Fangrui Song
58aa00e6c8
Switch to {Request,Notification}Message
2018-01-19 01:01:56 -08:00
Fangrui Song
0e2b2cfb0c
Switch to {Request,Notification}Message
2018-01-19 00:56:09 -08:00
Fangrui Song
148a8b3f20
Add {Request,Notification}Message
2018-01-19 00:48:08 -08:00
Fangrui Song
162f995344
Better deserialization error messages
2018-01-19 00:14:47 -08:00
Fangrui Song
556f32ec1b
Throw std::invalid_argument for deserialization type error
2018-01-18 22:47:44 -08:00
Chao Shen
b0bf107f71
Add option to disable filtering and sorting completion response.
2018-01-18 19:32:09 -08:00
Fangrui Song
5bef84cabf
Fix serializer MSVC C4244
2018-01-18 11:22:36 -08:00
Fangrui Song
bffe9203eb
Serialize int/long/long long instead of int32_t/int64_t
2018-01-18 10:41:46 -08:00
Fangrui Song
3c23ed8047
cquery_member_hierarchy.cc: Change uint64_t to size_t ( #304 )
2018-01-18 10:13:25 -08:00
Fangrui Song
9b8a0b01e6
Recognize .exe in GetCompilationEntryFromCompileCommandEntry
2018-01-18 09:12:55 -08:00
Jacob Dufault
71ae137393
Add ScopedPerfTimer
2018-01-18 08:25:47 -08:00
Chao Shen
de5e8eeeba
Ignore file name in comparing arguments.
2018-01-18 08:25:20 -08:00
Chao Shen
405fd56781
Crash Hotfix.
2018-01-18 08:24:10 -08:00
Jacob Dufault
ae26aa93db
Fix index not updating
2018-01-18 01:33:37 -08:00
Fangrui Song
545838f7eb
Support uint32_t serialization for size_t (which is either uint32_t or uint64_t on known systems)
2018-01-18 00:43:15 -08:00
Jacob Dufault
2ff823f2eb
Actually fix progress reporting
2018-01-18 00:28:08 -08:00
Jacob Dufault
a233558fcd
Move file content loading into a separate function
2018-01-18 00:21:39 -08:00
Jacob Dufault
39b9991c8f
Fix MSVC compile
2018-01-18 00:09:13 -08:00
Jacob Dufault
e38c6103ea
FileNeedsParse no longer takes FileConsumerSharedState
2018-01-18 00:05:12 -08:00
Jacob Dufault
a1ae100478
Some import pipeline refactors
2018-01-18 00:01:32 -08:00
Fangrui Song
819f5198de
Add $cquery/memberHierarchy{Initial,Expand} to list member variables of a type
2018-01-17 23:51:19 -08:00
Jacob Dufault
5b092dc9da
Rename variable
2018-01-17 23:24:52 -08:00
Jacob Dufault
13e56ac16f
Log if a file was reparsed due to timestamp or argument change.
2018-01-17 23:19:08 -08:00
Jacob Dufault
c80697a8d8
Add tests for FileNeedsParse
2018-01-17 23:11:33 -08:00
Jacob Dufault
bb0dd636ed
Fix spelling mistake
2018-01-17 22:13:44 -08:00
Jacob Dufault
a3774a371f
Reindex a file when command line arguments have changed
2018-01-17 22:04:07 -08:00
Jacob Dufault
bc2521382d
FileNeedsParse is a separate function
2018-01-17 21:53:03 -08:00
Jacob Dufault
4c1ee74b27
Merge ParseFile and DoParseFile
2018-01-17 21:48:09 -08:00
Jacob Dufault
8fef86c0f8
Remove ImportManager::HasActiveQuerydbImports.
...
ImportPipelineStatus::num_active_threads can be used instead.
2018-01-17 21:34:47 -08:00
Jacob Dufault
0fd3d69600
Return false instead of exiting
2018-01-17 21:29:40 -08:00
Jacob Dufault
6e56d97d97
Take unsaved_files by reference
2018-01-17 21:29:40 -08:00
Jacob Dufault
3058e15460
StringJoin can take a separator.
2018-01-17 21:29:40 -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
Jacob Dufault
67834ca783
Strongly typed semantic highlighting kind
2018-01-16 17:48:22 -08:00
Fangrui Song
98fb9ee821
.
2018-01-15 17:38:28 -08:00