Fangrui Song
d573a68130
Simplify operator==
2018-02-04 10:09:58 -08:00
Fangrui Song
7a1464cadb
Fix #410
2018-02-03 20:37:39 -08:00
Fangrui Song
6933870962
Change symbol id from size_t to RawId (uint32_t currently)
2018-02-03 10:35:17 -08:00
Fangrui Song
e42f6b6191
optional<...> GetQuery*IdFromUsr -> Maybe
2018-02-01 23:17:34 -08:00
Fangrui Song
ae999f9c92
size_t Query*::symbol_idx -> Maybe<Id<void>>
2018-02-01 22:52:03 -08:00
Fangrui Song
3c6f3f661f
Use Maybe<Id<T>> for {Func,Type,Var}DefDefinitionData
...
sizeof(db->funcs[0].def) 224 (-24)
sizeof(db->types[0].def) 248 (-24)
sizeof(db->vars[0].def) 160 (-24)
2018-02-01 22:31:43 -08:00
Fangrui Song
392cd79d04
Add Maybe<T> and change definition_{spelling,extent} from optional to Maybe
...
sizeof(db->funcs[0].def) decreases from 248 to 232
sizeof(db->types[0].def) decreases from 272 to 256
sizeof(db->vars[0].def) decreases from 184 to 168
2018-02-01 21:39:23 -08:00
Jacob Dufault
c98d53cfe2
Indexer now has access to |config|
2018-01-31 21:48:49 -08:00
Jacob Dufault
301d295f79
Remove std::experimental uses
2018-01-31 21:18:32 -08:00
Fangrui Song
4c895bef0b
Make optional<string> {hover,comments} non-optional
2018-01-30 23:48:34 -08:00
Fangrui Song
77dca1936b
Change TypeDefDefinition::short_name from string to string_view
2018-01-30 23:01:59 -08:00
Fangrui Song
93269ecfd4
Change std::string FuncDefDefinition::short_name to ShortName()
2018-01-30 22:40:02 -08:00
Fangrui Song
41f87887bb
Change std::string VarDefDefinition::short_name to ShortName()
2018-01-30 22:04:55 -08:00
Jacob Dufault
f6a2a55209
Import pipeline improvements
...
- Cache manager is created by request
- Index is always associated with its contents
- Reduced frequently of file reads
2018-01-29 21:34:36 -08:00
Jacob Dufault
7579d71b85
Simplify MAKE_REFLECT_TYPE_PROXY
2018-01-29 16:35:01 -08:00
Fangrui Song
bdb880e0a5
Serialize VarDefDefinitionData::{parent_kind,parent_id}
2018-01-28 12:34:31 -08:00
Fangrui Song
70bbe6c64c
Use major/minor versions for IndexFile
...
Fixes #364
2018-01-27 21:47:37 -08:00
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
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
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
50c6ed1dd3
Clean up SetTypeName
2018-01-25 22:25:19 -08:00
Fangrui Song
2e0f14bef8
Add whitelist/blacklist to $cquery/freshenIndex
2018-01-20 11:39:44 -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
scturtle
b8a3e089ce
Response on index error. ( #319 )
2018-01-19 23:56:49 -08:00
Jacob Dufault
67834ca783
Strongly typed semantic highlighting kind
2018-01-16 17:48:22 -08:00
Fangrui Song
c3136122ad
Add optional<IndexFuncId> semantic_container to VarDefDefinitionData and cleanup
2018-01-15 10:08:03 -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
11436c1f0d
Flatten msgpack by replacing pack_array() with pack()
...
msgpack::unpacker is not a complete streaming deserializer. It returns maps/arrays as a whole but does not allow us to step into individual elements. There is some memory overhead and it is also likely less efficient. By flattening maps, we also no longer need to track how many fields a struct has, which is less error-prone.
2018-01-07 20:52:16 -08:00
Fangrui Song
4e6c585e59
Add mnemonic constants to ClangSymbolKind
2018-01-07 16:06:07 -08:00
Fangrui Song
286a0649c1
msgpack seems to work
...
Specify cacheFormat: 1 (SerializeFormat::MessagePack) in initializationOptions to write to .mpack cache files.
2018-01-06 21:12:10 -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
fe0313f0b5
Add a parameter (number of __VA_ARGS__) to REFLECT_MEMBER_START
...
rapidjson StartArray StartObject do not need the number of fields, but msgpack-c does.
2018-01-06 16:42:22 -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
6fa92f7968
Compare hover & comments in {Func,Type,Var}DefDefinitionData::operator==
...
So that the changes populate to querydb.
Also expand two std::set_difference calls to save one scan
2018-01-01 12:36:08 -08:00
Fangrui Song
95126bff61
In detailed_name
, remove space between *
and name
2017-12-30 13:11:55 -08:00
Jacob Dufault
c596e55dcc
Cleanup some includes.
2017-12-29 12:00:52 -06:00
Fangrui Song
d4ce12bb9a
Add --use-clang-cxx to waf and move type printer to src/type_printer.cc
...
src/type_printer.cc demonstrates how to leverage clang C++ API.
It includes clang/**/*.h headers and CXTranslationUnit.h which resides
in clang/tools/libclang/ but is not exposed in clang/include/clang-c/
These libclang/ header files are stable and provide some struct definitions used by clang-c/ header files.
A copy of them from clang source tree is checked into libclang/ .
If you want to an early adopter,
CXXFLAGS='-std=c++11 -fno-rtti -D_GLIBCXX_USE_CXX11_ABI=0 -g' ./waf configure --variant=cxx-debug --bundled-clang=5.0.1 --use-clang-cxx
Some clang/**/*.h are unstable and should be used with caution,
in addition, Windows pre-built binaries on https://releases.llvm.org/download.html do not include C++ header files.
Thus `--use-clang-cxx` defaults to False.
2017-12-29 09:51:26 -08:00
romix
03b50ea3cc
Serialize decl comments and use them in GetHoverForSymbol
2017-12-24 18:01:38 -08:00
scturtle
f10521372b
Initilize var.def.cls to unknown.
2017-12-23 19:29:32 -06:00
scturtle
cb7ccbe543
Change var.def.is_* to enum.
2017-12-23 19:29:32 -06:00
Jacob Dufault
fb491e6c6d
Format using clang format 4.0.0
2017-12-23 08:33:26 -08: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
Chao Shen
0985613d16
Add is_global and is_member.
2017-12-23 01:00:46 -06:00