Compare commits

..

179 Commits

Author SHA1 Message Date
Fangrui Song
d31cc9f076 Adapt llvm 22 changes
Type::Elaborated is removed by llvmorg-22-init-3166-g91cdd35008e9

llvm::sys::fs and clang functions are changed due to
https://discourse.llvm.org/t/rfc-file-system-sandboxing-in-clang-llvm/88791
2025-11-29 21:53:40 -08:00
zhscn
a7068f13ec indexer: Resolve the type alias correctly (#988)
The struct derived from an alias is missing from type hierarchy before this fix:
```cpp
struct Base {};
struct Derived : Base {};
using BaseAlias = Base;
struct DerivedAlias : BaseAlias {};
```
```
Derive from
Base
└╸Derived
```
The expected output is:
```
Derive from
Base
├╸Derived
└╸DerivedAlias
```
2025-11-15 14:27:19 -08:00
Fangrui Song
344e2e6557 Add clang.prependArgs option
To specify arguments that are inserted immediately after the compiler
driver name. For example, initialization options
`{"clang":{"prependArgs":["--gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/13"]}}`
transforms `clang -c a.cc` into `clang --gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/13 -c a.cc`.
This allows users to provide default arguments that can be overridden as
needed.
2025-08-15 12:00:00 -07:00
Fangrui Song
791f6ba974 indexer: Support Decl::Concept
Fix indexer.cc:802 "Unhandled 72" when compiling `#include <chrono>`
functions with -std=c++20.
2025-11-15 14:03:07 -08:00
Fangrui Song
2b6d3753f7 index_tests: Test 22.0.0git
Build llvm-project
```
ninja -C out/stable clang clangFormat clangIndex clangTooling
```

Then build ccls against the just-built llvm-project.
```
cmake -S. -Bout/debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=$HOME/Stable/bin/clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCMAKE_PREFIX_PATH="$HOME/llvm/out/stable;$HOME/llvm/out/stable/tools/clang" -DCLANG_EXECUTABLE=$HOME/Stable/bin/clang++
```

Finally, run `ccls -test-index`
2025-08-14 23:42:18 -07:00
Fangrui Song
e0a6ee33cc index: remove unused SemaManager parameter 2025-08-14 21:45:02 -07:00
Stephen Senran Zhang
4427527ed8 Accommodate changes of LLVM 21 & 22 to fix builds (#985) 2025-08-07 00:54:25 +08:00
Fangrui Song
44fb405d00 Adapt llvmorg-21 changes: clang::CompilerInstance and llvm::PointerUnion 2025-05-11 23:01:55 -07:00
Fangrui Song
962c0e72b4 Clear index requests upon "exit"
to make indexers stop in time. This is especially relevant when there
are many initial index requests.
2025-01-28 10:34:19 -08:00
Ka Ho Ng
48f1a006b7
Reformat all the files after 192a82b (#979)
Since the introduction of "ColumnLimit: 120" in .clang-format, the
column limit has become 120 characters instead of 80 characters.

This prevents clang-format from generating too much changes even if just
a small portion of a source file or header file is modified.
2024-12-06 17:58:19 -08:00
Fangrui Song
4331c89586 Adapt llvmorg-20-init-12964-gdf9a14d7bbf1: createDiagnostics 2024-11-23 18:33:49 -08:00
Fangrui Song
3640f899f1 textDocument/signatureHelp: add trigger character {
to enable https://reviews.llvm.org/D116317
2024-11-09 23:10:55 -08:00
Fangrui Song
664f952f38 Implement textDocument/switchSourceheader
When the current file is X.cc, there might be multiple X.h.
Use a heuristic to find the best X.h.

Vote for each interesting symbol's definitions (for header) or
declarations (for non-header). Select the file with the most votes.

If `file_id2cnt` is empty, use a simpler heuristic.
2024-11-08 20:56:30 -08:00
Fangrui Song
cc13ced659 Support LSP semantic tokens
This patch implements `textDocument/semanticTokens/{full,range}`. If the
client supports semantic tokens, $ccls/publishSemanticHighlight (now
deprecated) is disabled.

These token modifiers are mostly useful to emphasize certain symbols:
`static, classScope, globalScope, namespaceScope`.

To enable a colorful syntax highlighting scheme, set the
highlight.rainbow initialization option to 10.
https://maskray.me/blog/2024-10-20-ccls-and-lsp-semantic-tokens

Note that the older $ccls/publishSemanticHighlight protocol with
highlight.lsRanges==true (used by vscode-ccls) is no longer supported.
2024-11-05 21:57:24 -08:00
Fangrui Song
50fd8d069e Drop support for LLVM 7, 8, and 9 2024-11-01 23:50:25 -07:00
Fangrui Song
192a82ba85 .clang-format: ColumnLimit: 120 2024-10-21 17:52:44 -07:00
Fangrui Song
349cdc471b didOpen: Sort index requests by approximity to working files
For a large project, it is preferable to prioritize indexing files
neighboring working files.
2024-10-21 17:49:54 -07:00
Sam James
ddbe41300f
utils: Add <cstdint> (#968)
utils uses `uint64_t` without including `<cstdint>`
which fails to build w/ GCC 15 after a change in libstdc++ [0]

[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
2024-10-02 17:36:02 -07:00
Fangrui Song
e5e101253a Adapt llvmorg-19-init-9465-g39adc8f42329: BuiltinType::ArraySection 2024-05-05 17:49:30 -07:00
Fangrui Song
559b416409 Adapt llvmorg-19-init-9119-g4ec9a662d388: startswith/endswith removal 2024-05-05 17:49:30 -07:00
Fangrui Song
88e382f8a3 Adapt llvmorg-19-init-1720-gda95d926f6fc: InclusionDirective 2024-05-05 17:44:13 -07:00
Fangrui Song
f8d2778b65 Adapt llvm/llvm-project#74910: FileEntry::getName
Based on a patch by @zsrkmyn
2024-02-02 00:05:55 -08:00
Fangrui Song
f36ecb0c0e Adapt llvmorg-18-init-13684-ge1e34cc2a17c: llvm/Support/Host.h 2023-12-14 22:08:17 -08:00
Fangrui Song
490edc1e02 Adapt llvmorg-18-init-10631-gedd690b02e16: TTK_* 2023-11-15 16:01:09 -08:00
Fangrui Song
7b17426b9f Adapt llvmorg-18-init-4877-g62e576b454e1: getLangOpts 2023-09-09 19:43:27 -07:00
Fangrui Song
ee2d4f5b9a Disable -include b.hh => -include b.hh.{gch,pch} transition
See https://maskray.me/blog/2023-07-16-precompiled-headers for the
behavior.
2023-07-17 16:06:49 -07:00
Fangrui Song
ba38e13b93 Adapt llvmorg-17-init-4072-gcc929590ad30: PrecompiledPreamble::Build 2023-04-11 11:04:01 -07:00
Fangrui Song
8bc3959537 Use raw module format to fix -gmodules crash
To avoid `llvm::report_fatal_error("unknown module format")` in getPCHContainerWriter.
See a3e2ff19e5
2023-01-15 12:14:42 -08:00
Fangrui Song
2468edc0b3 cmake: Adapt llvmorg-16-init-15123-gf09cf34d0062 (LLVMTargetParser) 2023-01-14 21:37:52 -08:00
Fangrui Song
6dc564f2a8 Adapt llvm::Optional deprecation 2023-01-09 16:03:16 -08:00
Fangrui Song
8a93950fb9 Add callHierarchy 2022-11-03 00:20:22 -07:00
Fangrui Song
74458915b3 Adapt llvmorg-15-init-7692-gd79ad2f1dbc2: PPCallbacks::InclusionDirective parameter 2022-04-16 22:29:03 -07:00
Fangrui Song
790daca4b2 query: include llvm/ADT/STLExtras.h
The header is no longer transitively included in 2022-01.
2022-01-30 11:17:32 -08:00
augiedoggie
b28cec1872
platform_posix: add support for Haiku (#863) 2022-01-23 00:22:29 -08:00
Fangrui Song
c7596e3712 initialize: Add offsetEncoding to InitializeResult 2022-01-11 19:25:21 -08:00
Fangrui Song
8422f0a522 Adapt llvmorg-14-init-13600-g92417eaf3329: braced constructor call 2022-01-09 12:25:07 -08:00
Fangrui Song
dce86b1362 cmake: Add LANGUAGE C to fix find_package(Clang REQUIRED) error 2021-12-15 10:14:34 -08:00
Fangrui Song
5a48e6c419 sema_manager: only keep latest session.maxNum sessions in case of a surge of textDocument/didChange 2021-09-23 14:41:51 -07:00
Fangrui Song
3ce756e39a Adaopt llvmorg-14-init-3863-g601102d282d5: refactor clang::isIdentifierBody 2021-09-23 13:36:01 -07:00
Fangrui Song
f21fd7e5a2 pipeline: Avoid Twine
For some reason, Twine(int), when concatenated, may incorrectly become Twine(const unsigned long&) and cause a dereference crash.
2021-06-26 12:07:41 -07:00
Fangrui Song
80d06eb476 sema_manager: Use llvm::CrashRecoveryContext 2021-05-18 21:01:50 -07:00
Ludovic J
c018bce9af hierarchicalDocumentSymbol: use a range based method to support
out-of-line class members (#674)
2021-05-09 11:33:34 -07:00
Fangrui Song
c6686be382 ccls_lsp
The old name was somehow taken.
2021-04-05 18:04:57 -07:00
zhangjunphy
0ada56ef3b Fix short_name_size when getNameAsString does not return a prefix (#784) 2021-03-30 23:33:43 -07:00
Fangrui Song
4cd308d7fd Adapt llvmorg-12-init-17739-gf4d02fbe418d: change CanReuse 2021-01-28 00:18:27 -08:00
Yu Zeng
aca02d209b Fix compile error when use msvc 2019 (#754)
See https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
2021-01-18 19:05:28 -08:00
Fangrui Song
40145807d5 completion: Don't overwrite the following identifier (#749) 2021-01-09 11:12:33 -08:00
Fangrui Song
a2d2fd8167 diagnosticMain: Rebuild preamble for bounds change 2020-12-26 12:31:41 -08:00
Jan Lahoda
4ff22e6603
Making the progress an integer, as per the specification (#739) 2020-12-26 12:30:53 -08:00
Fangrui Song
4c66fdf09d Resolve "directory" in compile_commands.json in case CWD is not the project root
Also delete an unneeded chdir hack.

Close #703
2020-12-19 21:42:21 -08:00
Fangrui Song
feb153a843 Adapt llvmorg-12-init-11522-g4c55c3b66de: change ComputePreambleBounds 2020-11-18 22:33:04 -08:00
Fangrui Song
68d6e4122d project: fix initial directory list for recursive .ccls
Fix #717
2020-11-06 18:55:01 -08:00
Fangrui Song
a3c5d4a1eb Adapt llvmorg-12-init-5498-g257b29715bb: add an argument to the ctor of clang::driver::Driver 2020-09-23 16:06:49 -07:00
Fangrui Song
20a9f7b5f4 clang_tu: set RecoveryAST & RecoveryASTType 2020-08-30 10:21:58 -07:00
Fangrui Song
55c0d5b4eb project: override the compdb entry with .ccls if compile_commands.json is not used
Note: `exact_match` should be false if the entry is an synthetic one, instead
of an explicit entry in compile_commands.json
2020-08-26 11:36:55 -07:00
Fangrui Song
aa4d2d1b43 If clang >= 10, don't crash on #pragma clang __debug 2020-08-22 10:29:39 -07:00
Fangrui Song
125915e254 Adapt llvmorg-12-init-946-g10b1b4a231a: add find_package(ZLIB) 2020-07-25 08:30:18 -07:00
Fangrui Song
ca95f48a53 Support workspaces as symlinks and symlinks within a workspace
Fix #639
2020-07-19 17:03:16 -07:00
Fangrui Song
5108cfafcb Report index status via $/progress
Add WorkDoneProgress to represent WorkDoneProgressBegin/WorkDoneProgressReport/WorkDoneProgressEnd.
2020-07-04 10:05:26 -07:00
Ernest Borowski
468258d641 cmake: Fix rapidJSON version detection 2020-06-29 22:46:00 -07:00
Fangrui Song
6244594d71 indexer: log the number of errors and the first diagnostic
Example log:

```
15:47:45 indexer1         pipeline.cc:379 I parse /tmp/d/a.c error:1 use of undeclared identifier 'arg'
 clang /tmp/d/a.c --gcc-toolchain=/usr -working-directory=/tmp/d/
```
2020-06-28 17:16:35 -07:00
Fangrui Song
8cf8a3c4a4 Disable PCH reading/writing 2020-06-14 23:16:13 -07:00
Victor Sui
7a05f1ed06 cmake: Fail loudly when found rapidjson is too old (#646)
When the rapidjson found by cmake is an older version it defines a
variable RAPIDJSON_INCLUDE_DIRS instead of RapidJSON_INCLUDE_DIRS (#455).
According to #383 we do not want to make these older version work with
ccls. However currently if the rapidjson found by cmake is an older
version that defined RAPIDJSON_INCLUDE_DIRS, then the cmake invocation
still succeeds but any build command will fail because
RapidJSON_INCLUDE_DIRS was never set properly. This makes the cmake
invocation fail with a relevant error message in this event.
2020-06-14 23:15:48 -07:00
Ludovic Jozeau
c5acf62060 indexer: set the kind of static data members to Field instead of Var
Otherwise it is impossible to distinguish a static variable from a
static member variable.

Close #593
2020-04-22 09:08:20 -07:00
Fangrui Song
de800ebb70 sema_manager: report diagnostics in macro expansions
Fix #608
2020-04-19 11:27:57 -07:00
Fangrui Song
c10642d29b Delete ci/ and use .gitignore whitelist 2020-03-22 09:50:48 -07:00
Evan Klitzke
386f714f5e Set indexer threads' priority to ThreadPriority::Background (#538) 2019-12-02 19:20:39 -08:00
Fangrui Song
6c87a4656c project: decrease score if .c is matched against .hh (#549) 2019-12-22 10:06:34 -08:00
akocis
e373f9ed97 position: support line numbers larger than INT16_MAX (but <= UINT16_MAX) (#553) 2019-12-27 20:56:50 +01:00
Jan Lahoda
a2ecd9a8f0 textDocument/documentSymbol: support unopened files (#548) 2019-12-22 09:26:23 +01:00
xVan Turing
06a04d5102 indexer: add name for anonymous Enum 2019-11-16 05:42:51 +08:00
Felicián Németh
760f5e57ff initialize: implement serverInfo (LSP 3.15.0)
Return serverInfo for an initialize request. This helps clients to
identify ccls even when they just connect to a TCP port and allows them
to easily implement server specific functionalities like $ccls/navigate.
2019-11-11 10:19:24 +01:00
Fangrui Song
0a1e08a8ca indexer: fix getAdjustedDecl for explicit instantiations; fix incorrect short_offset_size=1 when name is empty
Fix #516
2019-11-09 13:27:09 -08:00
Fangrui Song
7e795e9b9e cmake: support CLANG_LINK_CLANG_DYLIB 2019-11-01 10:36:38 -07:00
Fangrui Song
0fe8a16504 Infer -target and --driver-mode from argv[0]
Fix #511
2019-10-31 22:31:03 -07:00
Fangrui Song
5935db10fd Fix some clang-tidy warnings
Incorporated some fixes by Daniel Chabrowski (#467)
2019-10-10 19:24:44 -07:00
Fangrui Song
2bffff7b0b Add initialization option completion.placeholder; change client.snippetSupport: false to drop ( and <
* client.snippetSupport: false => `foo`
* client.snippetSupport: true
  + completion.placeholder: false => `foo($1)$0` `bar<$1>()$0`
  + completion.placeholder: true => `foo(${1:int a}, ${2:int b})$0` `bar<${1:typename T}>()$0`

Note, client.snippetSupport is always false if the client does not support snippets.

Close #412
2019-10-06 23:54:45 -07:00
Fangrui Song
aa9668a8fc completion: don't reuse cache if the buffer line has changed
Fix emacs-ccls#54
2019-09-26 23:25:09 -07:00
Fangrui Song
0c6be472ce project: strip -Xclang <arg> 2019-09-11 19:05:04 -07:00
Fangrui Song
b3d694b8bd indexer: disable warnings and skip processed function bodies
Adapt clang rC370337: removal of createIndexingAction and WrappingIndexAction
2019-08-21 18:59:41 -07:00
Fangrui Song
65f86d0498 indexer: llvm::sys::fs::UniqueID -> clang::FileID
Fix a minor issue that an empty included file is not recorded.

Note, we need to skip invalid uid2lid_and_path because
otherwise lid2path may contain invalid entries with lid: 0,
which will cause the file entry with file_id 0 to have an empty path.
2019-08-21 23:46:02 -07:00
Fangrui Song
0f0e679edb indexer: delete redundant consumeFile 2020-04-21 21:43:56 -07:00
Fangrui Song
6717986541 Adapt llvmorg-11-init-1314-g777180a32b6: StringRef's conversion to std::string is now explicit
For compatibility with LLVM 7, the call sites have to be a bit verbose.
2020-01-29 00:29:06 -08:00
Fangrui Song
61a1071634 💥 Rename FunctionName -> functionName, VarName -> var_name 2019-08-22 10:12:03 -07:00
Fangrui Song
62fbde7873 textDocument/definition: don't jump to the type definition 2019-08-22 02:24:20 -07:00
Fangrui Song
50d7fbc235 project: allow absolute compilationDatabaseDirectory
Fix #466
2019-08-16 19:34:11 -07:00
Shengjing Zhu
0eebe0c1a9 Support override CLANG_RESOURCE_DIR
The result from clang commandline is something like
/usr/lib/llvm-7/lib/clang/7.0.1

Which means I need to recompile when the clang is upgraded to newer 7.x.x

However the system has a convenient symlink, which is
/usr/include/clang/7.
2019-08-11 18:06:47 +08:00
Fangrui Song
17dc4a6ecc Construct SourceManager with UserFilesAreVolatile
Fix #235. Close #453

In clang, it may be worth generalizing UserFilesAreVolatile (introduced in rC160074) to FilesAreVolatile.
2019-07-30 21:18:34 -07:00
Fangrui Song
a43e51f3bf project: improve ComputeGuessScore heuristics 2019-07-20 06:13:53 -07:00
Fangrui Song
ab6498e2ff Support indexing non-existent files in index.onChange:true mode 2019-07-20 01:16:15 -07:00
Fangrui Song
86a93b2d71 $ccls/fileInfo: optionally dump dependencies, includes and skipped_ranges 2019-07-20 02:24:07 -07:00
Riatre Foo
3dac492025 Change RequestId::value from int to std::string to allow non-numeric IDs. 2019-07-16 14:39:35 +08:00
Dan Čermák
795ad205d7 Only add include directories for LLVM, clang & rapidjson if they are not in CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
/usr/include/c++/9 comes before /usr/include in `{clang,gcc} -v -fsyntax-only -xc++ /dev/null`.

    target_include_directories(ccls SYSTEM PRIVATE ${RapidJSON_INCLUDE_DIRS})

If ${RapidJSON_INCLUDE_DIRS} resolves to /usr/include, /usr/include will
be shuffled before /usr/include/c++/9 and will cause `#include_next <stdlib.h>`
issues (see https://github.com/MaskRay/ccls/pull/417).

Check if the include directories are already in CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES.
2019-06-27 12:19:11 +02:00
Fangrui Song
c728fe9795 project: support %cu directive and strip -M* options 2019-06-27 19:11:38 -07:00
Fangrui Song
ab4b4efcaf pipeline: report changed arg 2019-06-27 01:41:25 -07:00
TÖRÖK Attila
b7027f89e5 threaded_queue.hh: fix -Wpessimizing-move (#409) 2019-06-18 08:45:20 +02:00
Fangrui Song
20883c047c utils.hh: work around MSVC STL bug 2019-06-17 23:42:48 -07:00
Fangrui Song
0d911077f4 Set Diag::concerned if any of its Notes is concerned 2019-05-12 09:03:58 -07:00
Fangrui Song
fd3e82b682 Refactor FindEntry and use best-fit .ccls
Fixes an issue with hierarchical .ccls found by Riatre in #384
2019-04-29 08:44:52 -07:00
Fangrui Song
94727b7eae JsonWriter: write "null" if VersionedTextDocumentIdentifier.version is null
Fix #387
2019-04-30 06:22:32 -07:00
Riatre Foo
aa2f55eb2b Append '/' before populating folder.dot_ccls 2019-04-28 19:11:10 +08:00
Fangrui Song
0951004370 Set RetainCommentsFromSystemHeaders to true
Note with -fretain-comments-from-system-headers, the .gch of bits/stdc++.h becomes larger by 1%, but that is fine.

And improve comment handling in textDocument/hover

Fix #373
2019-04-11 22:26:07 -07:00
Fangrui Song
3a364c868b Set RetainRemappedFileBuffers to true
Reported by David Welch in #350.

This fixes double-free of llvm::MemoryBuffer when parsing fails.
2019-03-29 07:48:58 -07:00
Fangrui Song
4c871d9783 Add error checking of object deserialization; ignore non-object initializationOptions 2019-03-29 06:54:41 -07:00
Fangrui Song
4808ccb32c Add missing headers to adapt llvmorg-11-init-5501-g213aea4c583 and llvmorg-11-init-5528-gd7c5037e6b9 2020-03-12 08:35:59 -07:00
Fangrui Song
b0d42ad8f2 Adapt llvmorg-10-init-12036-g3b9715cb2193: handleDeclOccurence -> handleDeclOccurrence 2019-12-16 22:11:31 -08:00
Fangrui Song
a858567686 Adapt rL364464: clang::FrontendAction::Execute returns llvm::Error instead of bool 2019-06-27 01:10:04 -07:00
Fangrui Song
aab9dd6642 Simplify: hide unrelated options 2019-05-08 07:45:17 -07:00
Fangrui Song
34c5954420 Adapt clang rC358696: removal of OutputIsBinary 2019-04-18 19:16:24 -07:00
Fangrui Song
1066548dba Adapt D73392 - split of llvm/Support/Allocator.h 2020-01-25 09:57:16 -08:00
Fangrui Song
f1cbf8d550 Adapt clang rC357037: removal of setVirtualFileSystem 2019-03-26 18:42:48 -07:00
Fangrui Song
17eaca8a02 Add initialization option index.initialNoLinkage: false
By default, the background indexer doesn't handle names of no linkage.
They are indexed when their files are opened. This saves memory and
makes cache files smaller.
2019-03-24 23:42:00 -07:00
Paul Smith
b6155ddf73 Enhance the output of --version with Git describe results. (#342) 2019-03-23 20:24:10 -04:00
Fangrui Song
7bee63d0e0 Change containers of Query*::Def fields from std::vector to ccls::Vec
Query*::Def contain several immutable std::vector fields. Change them to
ccls::Vec to save bytes which were wasted by `capacity`.
2019-03-15 09:33:44 -07:00
Fangrui Song
e576df4f6f Add initialization option index.name.suppressUnwrittenScope (default: false) 2019-03-10 08:55:01 -07:00
Fangrui Song
dbf7d8eb41 If the workspace folder is a symlink, convert paths relative to it (#314)
If the workspace folder is a symlink and the client doesn't follow it.
Treat /tmp/symlink/ as canonical and convert every /tmp/real/ path to
/tmp/symlink/.
2019-03-10 00:27:50 -08:00
Fangrui Song
7c70c0662f cmake: use {LLVM,Clang}Config.cmake
Combined Daan De Meyer's #227 with other simplification

* USE_SHARED_LLVM is deleted in favor of LLVM_LINK_LLVM_DYLIB
* LLVM_ENABLE_RTTI is deleted as it is provided by LLVMConfig.cmake
* Only direct Clang/LLVM dependencies are required in target_link_libraries
* Restrict -DCLANG_RESOURCE_DIRECTORY= to src/utils.cc
2019-03-09 19:45:37 -08:00
Fangrui Song
5d27ac9f34 Add excludeRole to documentSymbol and override declaration's range/selectionRange with definition's 2019-03-08 23:37:08 -08:00
Fangrui Song
478f849ada cmake: add option to use system rapidjson if exists 2019-03-08 22:46:43 -08:00
Fangrui Song
9ca095f49e Misc 2019-03-02 18:18:02 -08:00
Fangrui Song
6a3cff6e50 Make clang.excludeArgs accept glob patterns 2019-03-04 18:21:53 -08:00
Fangrui Song
6c7b868556 stdin: synthesize an "exit" NotificationMessage in abnormal termination 2019-03-04 06:52:07 -08:00
Fangrui Song
beff1f6e89 textDocument/rename: mitigate edits in the same place and edits in macro replacement
Mitigate edits in the same place (#294) and:

// textDocument/rename on `f`
void f();
void g() { m(); } // incorrectly rewrote m() before
2019-03-01 18:35:13 -08:00
Fangrui Song
4047db2669 Add .github/ISSUE_TEMPLATE
Adapted from https://github.com/hlissner/doom-emacs
2019-03-01 17:37:37 -08:00
Fangrui Song
74432a641d working_files: normalize \r\n and \n to \n
Clients may normalize end-of-line sequences, thus cause a mismatch
between index_lines and buffer_lines.

Thanks to CXuesong for reporting this issue!
2019-03-01 17:30:53 -08:00
Fangrui Song
dcaa5a07af Change Pos::line from int16_t to uint16_t
This allows representing line 0 ~ 65535.
2019-02-23 19:17:26 +08:00
Fangrui Song
9dea14e783 Make hover more detailed (e.g. include inheritance info) 2019-02-22 23:49:37 +08:00
Fangrui Song
f35883f9b4 indexer: index TemplateTypeParmDecl and ParmVarDecl in declarations for clang >= 9
Index ParmVarDecl in declarations if index.parametersInDeclarations is true

And support some unhandled Decl::Kind
2019-02-22 10:59:05 +08:00
Fangrui Song
0c04c27e59 Add cache.{hierarchicalPath,retainInMemory}
cache.hierarchicalPath: store cache files as $directory/a/b/c.cc.blob to
work around NAME_MAX limitation.

cache.retainInMemory: after this number of loads, keep a copy of file
index in memory. If set to 1, it avoids cache corruption if the index
file is changed after the initial load, which may happen if several
language clients open the same project and share the same cache
directory.

Also rename cacheDirectory cacheFormat to cache.{directory,format}
2019-02-21 23:46:20 +08:00
Leszek Swirski
633d8936a8 Use DiagnosticRelatedInformation if client supports publishDiagnostics.relatedInformation (#276)
In clients that support DiagnosticRelatedInformation, display
clang notes as these nested diagnostics rather than appending
them to the parent diagnostic's message. Behaviour for clients
that don't support related information should be unchanged.
2019-02-21 02:23:21 +01:00
Fangrui Song
66e9cbd9a6 indexer: change Pos computation from byte offset to UTF-8 encoded code point offset 2019-02-16 17:23:47 +08:00
Fangrui Song
3bf921b3bd Add initialization option capabilities.* and index.maxInitializerLines
indexer.cc: use index.maxInitializerLines instead of kInitializerMaxLines

messages/initialize.cc: some ServerCapabilities are toggable:

documentOnTypeFormattingProvider.firstTriggerCharacter
foldingRangeProvider
workspace.workspaceFolders.supported
2019-02-10 18:17:07 +08:00
Fangrui Song
aaa97fe8df GetFallback: append clang.extraArgs
When compile_commands.json is absent, GetFallback is called to get
default clang command line when there is no .ccls or .ccls is empty.
2019-02-10 11:58:18 +08:00
Fangrui Song
03f91f0681 Compute CompletionItemKind from Declaration instead of CursorKind 2019-02-02 14:14:23 +08:00
Riatre Foo
2db67f6edb Fix is_local for vars with non-auto storage period 2018-10-15 23:25:46 +08:00
Riatre Foo
cd0f204349 textDocument/signatureHelp: enable documentation 2018-10-14 07:58:08 +08:00
Fangrui Song
716bc01322 Log {Request,Notification}Message, and timestamp change due to dependency 2019-01-29 15:47:03 +08:00
Riatre Foo
84f7d5081f Fix completion result sorting in VSCode (#210)
Fix #207
2019-01-30 23:21:40 +08:00
Fangrui Song
9bbb288b57 cmake: delete SYSTEM_CLANG and auto-download mechanism 2019-01-22 22:44:13 +08:00
Fangrui Song
343fa74dc1 Implement initialization option compilationDatabaseCommand on Windows 2019-01-21 12:15:28 +08:00
Fangrui Song
c6d56519e3 Drop support for clang 6 2019-01-21 10:44:44 +08:00
Fangrui Song
f496580081 Add -log-file=stderr and make it default
Change -log-file-append to a boolean flag
2019-01-21 10:20:07 +08:00
Fangrui Song
c592f95be0 completion: if preamble size changes, rebuild it
Fix #190

If a new header is added, the preamble size changes. Language clients may cache completion results, thus we rebuild preamble to avoid inaccurate results.
2019-01-13 18:33:18 +08:00
Fangrui Song
962dcf93c1 Update wiki links and delete comparison with cquery 2019-01-04 10:54:20 +08:00
Fangrui Song
f99cf50456 textDocument/didOpen: index related files when a header is opened
Fix #180

index.initialBlacklist: ["."] can inhibit initial indexing (useful for larger code bases).
Opened files are still indexed, though.
This heuristic allows related files (a/foo.c a/b/foo.cc) to be indexed when a header (foo.h) is opened.
2019-11-09 20:09:13 -08:00
Fangrui Song
8835a555f8 Delay requests if the document has not not indexed (#176)
This fixes a plethora of "not indexed" errors when the document has not been indexed.

* Message handler throws NotIndexed if not overdue
* The message is put into backlog and tagged with backlog_path
* path2backlog[path] tracks backlog associated with document `path`
* The backlog is cleared when the index is merged
* backlog[0] is forced to run if it becomes overdue
2019-11-09 20:09:13 -08:00
Fangrui Song
dd74d03cfc Adjust FrontendOpts.Inputs[0] for inferred files 2019-11-09 20:09:13 -08:00
Fangrui Song
52e0289245 Handle file deletion and register workspace/didChangeWatchedFiles
* In the "initialized" callback, send client/registerCapability with DidChangeWatchedFilesRegistrationOptions
* In workspace/didChangeWatchedFiles callback, call pipeline::Index
* In pipeline::Index, add a `deleted` status
2019-11-09 20:09:13 -08:00
Fangrui Song
ab48179946 Make cacheDirectory related to project root; delete Timer 2019-11-09 20:09:13 -08:00
Fangrui Song
45ac75fce3 completion: ignore CXXDeductionGuide
Fix #173
2019-11-09 20:09:13 -08:00
Fangrui Song
c085e07b19 Extend .ccls
* Add %h for C header files (the suffix .h is considered a C header, not a C++ header)
* Add %hpp for C++ header files
* If .ccls exists, it provides full command line for files not specified by compile_commands.json (before, compile_commands.json was ignored)
* If the first line of .ccls is %compile_commands.json, it appends flags to compile_commands.json "arguments", instead of overriding.
  Files not specified by compile_commands.json will not be added to folder.entries, but their command line can be inferred from other files.

Also fix `#include <` completion of -I flags for clang < 8
2019-11-09 20:09:13 -08:00
Fangrui Song
3edda5cf76 Make -v=1 work and log cflags for SemaManager session and Indexer 2019-11-09 20:09:13 -08:00
Fangrui Song
6e8a45b25e Add strict to FuzzyMatcher::Match
In completion, underscore prefixed builtin macros may be annoying when the first type character is not an underscore.

When `strict` is true, `Match` enforces the first characters should be loosely of the same category.
2019-11-09 20:09:13 -08:00
Fangrui Song
836caba19b ParameterInformation: use label: [number, number]
Don't bother checking signatureHelp.signatureInformationparameterInformation.labelOffsetSupport
2019-11-09 20:09:13 -08:00
Fangrui Song
49ae9e8912 Support textDocument/declaration & LocationLink
textDocument/{declaration,definition,typeDefinition} return either LocationLink[] or Location[]
Add an initialization option client.linkSupport . When it is false, ccls will return Location[] disregarding client's linkSupport.
`struct LocationLink` does not include originSelectionRange as it is wasteful.
2019-11-09 20:09:13 -08:00
Fangrui Song
e3133bea90 cmake_minimum_required 3.8; clean up 2019-11-09 20:09:13 -08:00
Fangrui Song
20e0beb9f3 Rendezvous after receiving "exit" notification (#159) 2019-11-09 20:09:13 -08:00
Fangrui Song
c06c2ca324 Support multiple -init=
Initialization options are applied (deserialized to the same object) in the following order:

* "initializationOptions" from client
* first -init=
* second -init=
* ...

Scalar options will be overridden but arrays will get concatenated, e.g.

ccls -log-file=/dev/stderr -index . -init='{"clang":{"extraArgs":["-DA"]}}' -init='{"clang":{"extraArgs":["-DB"]}}'

results in clang.extraArgs: ["-DA", "-DB"]
2019-11-09 20:09:13 -08:00
Leszek Swirski
25c8928121 Spin IncludeComplete's destructor until scanning completes (#147) 2019-11-09 20:09:13 -08:00
Fangrui Song
c941ca1bcd query: fix UpdateUses when a new entity is seen; simplify {DeclRef,Use,Usr}Update
Thanks to Leszek Swirski
2019-11-09 20:09:13 -08:00
Fangrui Song
a47fb42e30 Refactor serializer
Delete virtual bases Reader & Writer
Delete unused MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY
Merge serializers/{json,binary}.hh into serializer.{hh,cc}
MAKE_REFLECT_STRUCT => REFLECT_STRUCT
MAKE_REFLECT_TYPE_PROXY => REFLECT_UNDERLYING
2019-11-09 20:09:13 -08:00
Fangrui Song
a599aef482 Add ReplyOnce::NotReady and error if didOpen is not seen
Use IgnoringDiagConsumer to override default TextDiagnosticPrinter
2019-11-09 20:09:13 -08:00
Fangrui Song
9ad2450009 Refactor WorkingFiles and CompletionManager
* WorkingFiles::files : vector -> unordered_map
* Add timestamp to WorkingFile

* Rename "comp-preload" thread to "preamble"
* Rename CompletionManager to SemaManager as it is used by "diag" "comp" "preamble"
* Rename clang_complete.* to sema_manager.*
* Merge SemaManager::{preloads,sessions}
* Add initialization option session.maxNum
* In DiagnosticMain, if an included file was modified, cancel the DiagTask and create a PreambleTask instead. The task sets `from_diag` so as to trigger immediate DiagTask after the preamble is built.
2019-11-09 20:09:13 -08:00
Fangrui Song
b9369e055a completion: use Text for Macro{Instantiation,Definition} 2019-11-09 20:09:13 -08:00
Fangrui Song
c6c234725a Fix ComputeGuessScore and delete dead code
Thanks to CXuesong
2019-11-09 20:09:13 -08:00
Fangrui Song
65d856cf8a Merge maybe.hh into utils.hh 2019-11-09 20:09:13 -08:00
Fangrui Song
880c515d64 Merge query.hh and query_util.hh 2019-11-09 20:09:13 -08:00
Fangrui Song
d6dd932e6d Refactor Matcher to use pimpl and merge match.hh into utils.hh 2019-11-09 20:09:13 -08:00
Fangrui Song
38e87a0729 Make EmptyParam empty & rewrite LruCache 2019-11-09 20:09:13 -08:00
Fangrui Song
9603a73421 constexpr std::string_view -> const std::string_view
This works around gcc 7.2/clang rC347417 which have a bad interaction with libstdc++'s implementation of P0426
constexpr std::string_view also emits a string_view object in .rodata that cannot be optimized out by clang (which means larger object file size)

So use good old const.
2019-11-09 20:09:13 -08:00
Fangrui Song
7f8f68c0b2 codeAction: use codeActionProvider: CodeActionOptions and respect CodeActionParams::range 2019-11-09 20:09:13 -08:00
Fangrui Song
19d38bc1d2 Make DocumentLink::range narrower
Thanks to Riatre #135
2019-11-09 20:09:13 -08:00
Fangrui Song
0f0c328a91 completion: delete insertText; don't set filterText if it is the same as label
It decreases Content-Length: from 32K to 25K for the following case:

 #include <bits/stdc++.h>
int main() { std::| }

Also

* make results deterministic when completion text is empty
* sort by newText, label, filterText
2019-11-09 20:09:13 -08:00
Fangrui Song
98be09cc2e serializer: make visitor/vis value/v consistent 2019-11-09 20:09:13 -08:00
Fangrui Song
741d8f2130 Refactor ReplyOnce; error if InitializeParams.rootUri is null 2019-11-09 20:09:13 -08:00
Fangrui Song
8f442c6c35 indexer: handle DecltypeType and empty main file; diag: -Wno-unused-function for headers
Don't replace name with qualified name in Cls::*name
2019-11-09 20:09:13 -08:00
Fangrui Song
e27a5eaff9 .ccls: add %objective-c %objective-cpp
Also allow multiple directives on a line, e.g. %c %cpp -DFOO
2019-11-09 20:09:13 -08:00
Fangrui Song
46d3f075dc Use clang::isIdentifierBody and clean up utils/working_files 2019-11-09 20:09:13 -08:00
Fangrui Song
95bba3ed15 hierarchicalDocumentSymbol: support SymbolKind::Function declaration and uniquify by range
Also ensure selectionRange is a subrange of range, otherwise VSCode won't show the item.
Use detailed_name for 'detail'
2019-11-09 20:09:13 -08:00
203 changed files with 9096 additions and 8171 deletions

View File

@ -15,7 +15,7 @@ install:
- 7z x llvm.tar
- git submodule update --init --recursive
build_script:
- cmake -G"Visual Studio 15 2017 Win64" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DSYSTEM_CLANG=ON -DCLANG_ROOT=C:\projects\ccls\llvm+clang-7.0.0-win64-msvc-release
- cmake -G"Visual Studio 15 2017 Win64" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=C:\projects\ccls\llvm+clang-7.0.0-win64-msvc-release
- cmake --build build --target ccls --config Release
artifacts:

View File

@ -1 +1,2 @@
BasedOnStyle: LLVM
ColumnLimit: 120

36
.github/ISSUE_TEMPLATE vendored Normal file
View File

@ -0,0 +1,36 @@
Here are some things you should try before filing a bug report:
+ For client issues related to [emacs-ccls](https://github.com/MaskRay/emacs-ccls) or [vscode-ccls](https://github.com/MaskRay/vscode-ccls), report in their own repository.
+ For build problems, check https://github.com/MaskRay/ccls/wiki/Build
+ Check https://github.com/MaskRay/ccls/wiki/Debugging
+ Check [the FAQ](https://github.com/MaskRay/ccls/wiki/FAQ) to see if your issue is mentioned.
If none of those help, remove this section and fill out the four sections in the template below.
---
### Observed behavior
Describe what happened. Any aids you can include (that you think could be relevant) are a tremendous help.
* `compile_commands.json` or `.ccls` ([wiki/Project-Setup](https://github.com/MaskRay/ccls/wiki/Project-Setup))
* Reduce to A minimal set of `.c` `.cc` `.h` `.hh` files that can still demonstrate the issue.
* Consider a screencast gif.
### Expected behavior
Describe what you expected to happen.
### Steps to reproduce
1. Select these example steps,
2. Delete them,
3. And replace them with precise steps to reproduce your issue.
### System information
* ccls version (`git describe --tags --long`):
* clang version:
* OS:
* Editor:
* Language client (and version):

16
.gitignore vendored
View File

@ -1,5 +1,11 @@
.*
build
debug
release
/compile_commands.json
/*
!/.github/
!/index_tests/
!/src/
!/third_party/
!/.appveyor.yml
!/.clang-format
!/CMakeLists.txt
!/LICENSE
!/README.md
!/meow/

View File

@ -1,46 +1,34 @@
cmake_minimum_required(VERSION 3.1)
project(ccls LANGUAGES CXX)
cmake_minimum_required(VERSION 3.8)
project(ccls LANGUAGES CXX C)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
include(DefaultCMakeBuildType)
# Required Clang version
set(CLANG_DOWNLOAD_LOCATION ${CMAKE_BINARY_DIR}
CACHE STRING "Downloaded Clang location")
option(SYSTEM_CLANG "Use system installation of Clang instead of \
downloading Clang" OFF)
option(ASAN "Compile with address sanitizers" OFF)
option(LLVM_ENABLE_RTTI "-fno-rtti if OFF. This should match LLVM libraries" OFF)
option(CLANG_USE_BUNDLED_LIBC++ "Let Clang use bundled libc++" OFF)
option(USE_SHARED_LLVM "Link against libLLVM.so instead separate LLVM{Option,Support,...}" OFF)
option(USE_SYSTEM_RAPIDJSON "Use system RapidJSON instead of the git submodule if exists" ON)
# Sources for the executable are specified at end of CMakeLists.txt
add_executable(ccls "")
### Compile options
### Default build type
# CMake default compile flags:
# MSVC + Clang(Windows):
# debug: /MDd /Zi /Ob0 /Od /RTC1
# release: /MD /O2 /Ob2 /DNDEBUG
# GCC + Clang(Linux):
# debug: -g
# release: -O3 -DNDEBUG
set(DEFAULT_CMAKE_BUILD_TYPE Release)
# CMAKE_BUILD_TYPE is not available if a multi-configuration generator is used
# (eg Visual Studio generators)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${DEFAULT_CMAKE_BUILD_TYPE}' as none \
was specified.")
set(CMAKE_BUILD_TYPE ${DEFAULT_CMAKE_BUILD_TYPE}
CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE
PROPERTY STRINGS Debug Release MinSizeRel RelWithDebInfo)
endif()
### Compile options
# Enable C++17 (Required)
set_property(TARGET ccls PROPERTY CXX_STANDARD 17)
set_property(TARGET ccls PROPERTY CXX_STANDARD_REQUIRED ON)
# Disable gnu extensions except for Cygwin which needs them to build properly
if(NOT CYGWIN)
set_property(TARGET ccls PROPERTY CXX_EXTENSIONS OFF)
endif()
if(NOT LLVM_ENABLE_RTTI)
# releases.llvm.org libraries are compiled with -fno-rtti
# The mismatch between lib{clang,LLVM}* and ccls can make libstdc++ std::make_shared return nullptr
# _Sp_counted_ptr_inplace::_M_get_deleter
target_compile_options(ccls PRIVATE -fno-rtti)
endif()
# CMake sets MSVC for both MSVC and Clang(Windows)
if(MSVC)
@ -57,6 +45,7 @@ if(MSVC)
/wd4800
/wd4068 # Disable unknown pragma warning
/std:c++17
/Zc:__cplusplus
$<$<CONFIG:Debug>:/FS>
)
# relink system libs
@ -76,44 +65,51 @@ else()
target_compile_options(ccls PRIVATE
$<$<CONFIG:Debug>:-fno-limit-debug-info>)
endif()
if(ASAN)
target_compile_options(ccls PRIVATE -fsanitize=address,undefined)
# target_link_libraries also takes linker flags
target_link_libraries(ccls PRIVATE -fsanitize=address,undefined)
endif()
endif()
### Download Clang if required
if(NOT SYSTEM_CLANG)
message(STATUS "Using downloaded Clang")
include(DownloadAndExtractClang)
download_and_extract_clang(${CLANG_DOWNLOAD_LOCATION})
# Used by FindClang
set(CLANG_ROOT ${DOWNLOADED_CLANG_DIR})
if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang AND CLANG_USE_BUNDLED_LIBC++)
message(STATUS "Using bundled libc++")
target_compile_options(ccls PRIVATE -nostdinc++ -cxx-isystem ${CLANG_ROOT}/include/c++/v1)
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
# Don't use -stdlib=libc++ because while ccls is linked with libc++, bundled clang+llvm require libstdc++
target_link_libraries(ccls PRIVATE -L${CLANG_ROOT}/lib c++ c++abi)
# FreeBSD defaults to -stdlib=libc++ and uses system libcxxrt.a
endif()
endif()
else()
message(STATUS "Using system Clang")
endif()
### Libraries
# See cmake/FindClang.cmake
find_package(Clang 6.0.0)
target_link_libraries(ccls PRIVATE Clang::Clang)
find_package(Clang REQUIRED)
if(CLANG_LINK_CLANG_DYLIB)
target_link_libraries(ccls PRIVATE clang-cpp)
else()
target_link_libraries(ccls PRIVATE
clangIndex
clangFormat
clangTooling
clangToolingInclusions
clangToolingCore
clangFrontend
clangParse
clangSerialization
clangSema
clangAST
clangLex
clangDriver
clangBasic
)
endif()
if(LLVM_LINK_LLVM_DYLIB)
target_link_libraries(ccls PRIVATE LLVM)
else()
target_link_libraries(ccls PRIVATE LLVMOption LLVMSupport)
if(LLVM_VERSION_MAJOR GREATER_EQUAL 16) # llvmorg-16-init-15123-gf09cf34d0062
target_link_libraries(ccls PRIVATE LLVMTargetParser)
endif()
endif()
if(NOT LLVM_ENABLE_RTTI)
# releases.llvm.org libraries are compiled with -fno-rtti
# The mismatch between lib{clang,LLVM}* and ccls can make libstdc++ std::make_shared return nullptr
# _Sp_counted_ptr_inplace::_M_get_deleter
if(MSVC)
target_compile_options(ccls PRIVATE /GR-)
else()
target_compile_options(ccls PRIVATE -fno-rtti)
endif()
endif()
# Enable threading support
set(THREADS_PREFER_PTHREAD_FLAG ON)
@ -127,78 +123,95 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
target_link_libraries(ccls PRIVATE thr)
endif()
if(LLVM_ENABLE_ZLIB)
find_package(ZLIB)
endif()
### Definitions
target_compile_definitions(ccls PRIVATE
DEFAULT_RESOURCE_DIRECTORY=R"\(${Clang_RESOURCE_DIR}\)")
# Find Clang resource directory with Clang executable.
if(NOT CLANG_RESOURCE_DIR)
find_program(CLANG_EXECUTABLE clang)
if(NOT CLANG_EXECUTABLE)
message(FATAL_ERROR "clang executable not found.")
endif()
execute_process(
COMMAND ${CLANG_EXECUTABLE} -print-resource-dir
RESULT_VARIABLE CLANG_FIND_RESOURCE_DIR_RESULT
OUTPUT_VARIABLE CLANG_RESOURCE_DIR
ERROR_VARIABLE CLANG_FIND_RESOURCE_DIR_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(CLANG_FIND_RESOURCE_DIR_RESULT)
message(FATAL_ERROR "Error retrieving Clang resource directory with Clang \
executable. Output:\n ${CLANG_FIND_RESOURCE_DIR_ERROR}")
endif()
endif()
set_property(SOURCE src/utils.cc APPEND PROPERTY COMPILE_DEFINITIONS
CLANG_RESOURCE_DIRECTORY=R"\(${CLANG_RESOURCE_DIR}\)")
### Includes
if(USE_SYSTEM_RAPIDJSON)
set(RapidJSON_MIN_VERSION "1.1.0")
find_package(RapidJSON ${RapidJSON_MIN_VERSION} QUIET)
if(NOT DEFINED RapidJSON_INCLUDE_DIRS AND DEFINED RAPIDJSON_INCLUDE_DIRS)
set(RapidJSON_INCLUDE_DIRS "${RAPIDJSON_INCLUDE_DIRS}")
endif()
endif()
if(NOT RapidJSON_FOUND)
if(EXISTS "${CMAKE_SOURCE_DIR}/third_party/rapidjson/include")
message(STATUS "Using local RapidJSON")
set(RapidJSON_INCLUDE_DIRS third_party/rapidjson/include)
else()
message(STATUS "Plase initialize rapidJSON git submodule as currently installed version is to old:")
message(STATUS "git submodule init && git submodule update")
message(FATAL_ERROR "RapidJSON version is likely too old. See https://github.com/MaskRay/ccls/issues/455")
endif()
endif()
target_include_directories(ccls PRIVATE src)
target_include_directories(ccls SYSTEM PRIVATE
third_party
third_party/rapidjson/include)
foreach(include_dir third_party
${LLVM_INCLUDE_DIRS} ${CLANG_INCLUDE_DIRS} ${RapidJSON_INCLUDE_DIRS})
get_filename_component(include_dir_realpath ${include_dir} REALPATH)
# Don't add as SYSTEM if they are in CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES.
# It would reorder the system search paths and cause issues with libstdc++'s
# use of #include_next. See https://github.com/MaskRay/ccls/pull/417
if(NOT "${include_dir_realpath}" IN_LIST CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES)
target_include_directories(ccls SYSTEM PRIVATE ${include_dir})
endif()
endforeach()
### Install
install(TARGETS ccls RUNTIME DESTINATION bin)
if(NOT SYSTEM_CLANG AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL Windows)
if(${CMAKE_SYSTEM_NAME} MATCHES Linux|FreeBSD)
set_property(TARGET ccls APPEND PROPERTY
INSTALL_RPATH $ORIGIN/../lib)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
set_property(TARGET ccls APPEND PROPERTY
INSTALL_RPATH @loader_path/../lib)
endif()
file(GLOB LIBCLANG_PLUS_SYMLINKS
${DOWNLOADED_CLANG_DIR}/lib/libclang.[so,dylib]*)
install(FILES ${LIBCLANG_PLUS_SYMLINKS} DESTINATION lib)
endif()
# Allow running from build Windows by copying libclang.dll to build directory
if(NOT SYSTEM_CLANG AND ${CMAKE_SYSTEM_NAME} STREQUAL Windows)
add_custom_command(TARGET ccls
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${DOWNLOADED_CLANG_DIR}/bin/libclang.dll
$<TARGET_FILE_DIR:ccls>
COMMENT "Copying libclang.dll to build directory ...")
endif()
### Tools
# We use glob here since source files are already manually added with
# target_sources further down
file(GLOB SOURCES src/*.cc src/*.h src/serializers/*.cc src/serializers/*.h
src/messages/*.h src/messages/*.cc)
### Sources
target_sources(ccls PRIVATE third_party/siphash.cc)
target_sources(ccls PRIVATE
src/clang_complete.cc
src/clang_tu.cc
src/config.cc
src/filesystem.cc
src/fuzzy_match.cc
src/main.cc
src/include_complete.cc
src/indexer.cc
src/log.cc
src/lsp.cc
src/match.cc
src/message_handler.cc
src/pipeline.cc
src/platform_posix.cc
src/platform_win.cc
src/position.cc
src/project.cc
src/query_utils.cc
src/query.cc
src/sema_manager.cc
src/serializer.cc
src/test.cc
src/utils.cc
@ -227,3 +240,22 @@ target_sources(ccls PRIVATE
src/messages/textDocument_signatureHelp.cc
src/messages/workspace.cc
)
### Obtain CCLS version information from Git
### This only happens when cmake is re-run!
if(NOT CCLS_VERSION)
execute_process(COMMAND git describe --tag --long HEAD
OUTPUT_VARIABLE CCLS_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
if(NOT CCLS_VERSION)
set(CCLS_VERSION "<unknown>")
endif()
endif()
set_property(SOURCE src/main.cc APPEND PROPERTY
COMPILE_DEFINITIONS CCLS_VERSION=\"${CCLS_VERSION}\")
set_property(SOURCE src/messages/initialize.cc APPEND PROPERTY
COMPILE_DEFINITIONS CCLS_VERSION=\"${CCLS_VERSION}\")

View File

@ -1,6 +1,6 @@
# ccls
[![Telegram](https://img.shields.io/badge/telegram-@cclsp-blue.svg)](https://telegram.me/cclsp)
[![Telegram](https://img.shields.io/badge/telegram-@cclsp-blue.svg)](https://telegram.me/ccls_lsp)
[![Gitter](https://img.shields.io/badge/gitter-ccls--project-blue.svg?logo=gitter-white)](https://gitter.im/ccls-project/ccls)
ccls, which originates from [cquery](https://github.com/cquery-project/cquery), is a C/C++/Objective-C language server.
@ -11,7 +11,7 @@ ccls, which originates from [cquery](https://github.com/cquery-project/cquery),
* formatting
* hierarchies: [call (caller/callee) hierarchy](src/messages/ccls_call.cc), [inheritance (base/derived) hierarchy](src/messages/ccls_inheritance.cc), [member hierarchy](src/messages/ccls_member.cc)
* [symbol rename](src/messages/textDocument_rename.cc)
* [document symbols](src/messages/textDocument_documentSymbol.cc) and approximate search of [workspace symbol](src/messages/workspace_symbol.cc)
* [document symbols](src/messages/textDocument_document.cc) and approximate search of [workspace symbol](src/messages/workspace.cc)
* [hover information](src/messages/textDocument_hover.cc)
* diagnostics and code actions (clang FixIts)
* semantic highlighting and preprocessor skipped regions
@ -21,28 +21,9 @@ It has a global view of the code base and support a lot of cross reference featu
It starts indexing the whole project (including subprojects if exist) parallelly when you open the first file, while the main thread can serve requests before the indexing is complete.
Saving files will incrementally update the index.
Compared with cquery, it makes use of C++17 features, has less third-party dependencies and slimmed-down code base.
It leverages Clang C++ API as [clangd](https://clang.llvm.org/extra/clangd.html) does, which provides better support for code completion and diagnostics.
Refactoring is a non-goal as it can be provided by clang-include-fixer and other Clang based tools.
The comparison with cquery as noted on 2018-07-15:
| | cquery | ccls |
|------------ |--------------------------------|------------------------------|
| third_party | more | fewer |
| C++ | C++14 | C++17 |
| clang API | libclang (C) | clang/llvm C++ |
| Filesystem | AbsolutePath + custom routines | llvm/Support |
| index | libclang | clangIndex, some enhancement |
| pipeline | index merge+id remapping | simpler and more robust |
cquery has system include path detection (through running the compiler driver) while ccls uses clangDriver.
# >>> [Getting started](../../wiki/Getting-started) (CLICK HERE) <<<
# >>> [Getting started](../../wiki/Home) (CLICK HERE) <<<
* [Build](../../wiki/Build)
* [Emacs](../../wiki/Emacs)
* [LanguageClient-neovim](../../wiki/LanguageClient-neovim)
* [FAQ](../../wiki/FAQ)
ccls can index itself (~180MiB RSS when ide, noted on 2018-09-01), FreeBSD, glibc, Linux, LLVM (~1800MiB RSS), musl (~60MiB RSS), ... with decent memory footprint. See [wiki/compile_commands.json](../../wiki/compile_commands.json) for examples.
ccls can index itself (~180MiB RSS when idle, noted on 2018-09-01), FreeBSD, glibc, Linux, LLVM (~1800MiB RSS), musl (~60MiB RSS), ... with decent memory footprint. See [wiki/Project-Setup](../../wiki/Project-Setup) for examples.

View File

@ -1,45 +0,0 @@
#!/usr/bin/env bash
root=$(cd "$(dirname "$0")/.."; pwd)
version=$(TZ=UTC date +v%Y%m%d)
cd "$root/build/release"
case $(uname -s) in
Darwin)
libclang=(lib/clang+llvm-*/lib/libclang.dylib)
strip_option="-x"
name=ccls-$version-x86_64-apple-darwin ;;
FreeBSD)
libclang=(lib/clang+llvm-*/lib/libclang.so.?)
strip_option="-s"
name=ccls-$version-x86_64-unknown-freebsd10 ;;
Linux)
libclang=(lib/clang+llvm-*/lib/libclang.so.?)
strip_option="-s"
name=ccls-$version-x86_64-unknown-linux-gnu ;;
*)
echo Unsupported >&2
exit 1 ;;
esac
pkg=$(mktemp -d)
mkdir "$pkg/$name"
rsync -rtLR bin "./${libclang[-1]}" ./lib/clang+llvm-*/lib/clang/*/include "$pkg/$name"
cd "$pkg"
strip "$strip_option" "$name/bin/ccls" "$name/${libclang[-1]}"
case $(uname -s) in
Darwin)
# https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/tar.1.html
# macOS's bsdtar is lack of flags to set uid/gid.
# First, we generate a list of file in mtree format.
tar -cf filelist --format=mtree --options="!all,time,mode,type" "$name"
# Then add a line "/set uid=0 gid=0" after the first line "#mtree".
awk '/#mtree/{print;print "/set uid=0 gid=0";next}1' filelist > newflielist
# Finally, use the list to generate the tarball.
tar -zcf "$root/build/$name.tar.gz" @newflielist ;;
Linux)
tar -Jcf "$root/build/$name.tar.xz" --owner 0 --group 0 $name ;;
*)
tar -Jcf "$root/build/$name.tar.xz" --uid 0 --gid 0 $name ;;
esac
rm -r "$pkg"

View File

@ -1 +0,0 @@
74b197a3959b0408adf0824be01db8dddfa2f9a967f4085af3fad900ed5fdbf6

View File

@ -1 +0,0 @@
95ceb933ccf76e3ddaa536f41ab82c442bbac07cdea6f9fbf6e3b13cc1711255

View File

@ -1 +0,0 @@
b3ad93c3d69dfd528df9c5bb1a434367babb8f3baea47fbb99bf49f1b03c94ca

View File

@ -1 +0,0 @@
5c90e61b06d37270bc26edb305d7e498e2c7be22d99e0afd9f2274ef5458575a

View File

@ -1 +0,0 @@
69b85c833cd28ea04ce34002464f10a6ad9656dd2bba0f7133536a9927c660d2

View File

@ -1,14 +0,0 @@
set(DEFAULT_CMAKE_BUILD_TYPE Release)
# CMAKE_BUILD_TYPE is not available if a multi-configuration generator is used
# (eg Visual Studio generators)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${DEFAULT_CMAKE_BUILD_TYPE}' as none \
was specified.")
set(CMAKE_BUILD_TYPE ${DEFAULT_CMAKE_BUILD_TYPE}
CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE
PROPERTY STRINGS Debug Release MinSizeRel RelWithDebInfo)
endif()

View File

@ -1,52 +0,0 @@
# Downloads and extracts the 7-Zip MSI installer from https://www.7-zip.org/.
#
# Returns the extracted 7-Zip directory in DOWNLOADED_7ZIP_DIR
function(download_and_extract_7zip 7ZIP_DOWNLOAD_LOCATION)
set(7ZIP_VERSION 1801)
set(7ZIP_EXT .msi)
set(7ZIP_NAME 7z${7ZIP_VERSION}-x64)
set(7ZIP_FULL_NAME ${7ZIP_NAME}${7ZIP_EXT})
set(7ZIP_FILE ${7ZIP_DOWNLOAD_LOCATION}/${7ZIP_FULL_NAME})
set(7ZIP_EXTRACT_DIR ${7ZIP_DOWNLOAD_LOCATION}/${7ZIP_NAME})
set(7ZIP_URL https://www.7-zip.org/a/${7ZIP_FULL_NAME})
# Exit if 7-Zip is already downloaded and extracted
find_program(7ZIP_EXECUTABLE 7z NO_DEFAULT_PATH
PATHS ${7ZIP_EXTRACT_DIR}/Files/7-Zip)
if(7ZIP_EXECUTABLE)
message(STATUS "7-Zip already downloaded")
return()
endif()
message(STATUS "Downloading 7-Zip ${7ZIP_VERSION} (${7ZIP_URL}) ...")
file(DOWNLOAD ${7ZIP_URL} ${7ZIP_FILE})
find_program(MSIEXEC_EXECUTABLE msiexec)
if(NOT MSIEXEC_EXECUTABLE)
message(FATAL_ERROR "Unable to find msiexec (required to extract 7-Zip msi \
installer). Install 7-Zip yourself and make sure it is available in the path")
endif()
message(STATUS "Extracting downloaded 7-Zip ...")
# msiexec requires Windows path separators (\)
file(TO_NATIVE_PATH ${7ZIP_FILE} 7ZIP_FILE)
file(TO_NATIVE_PATH ${7ZIP_EXTRACT_DIR} 7ZIP_EXTRACT_DIR)
# msiexec with /a option allows extraction of msi installers without requiring
# admin privileges. We use this to extract the 7-Zip installer without
# requiring any actions from the user
execute_process(COMMAND ${MSIEXEC_EXECUTABLE} /a ${7ZIP_FILE} /qn
TARGETDIR=${7ZIP_EXTRACT_DIR}
WORKING_DIRECTORY ${7ZIP_DOWNLOAD_LOCATION}
OUTPUT_QUIET)
# Convert back to CMake separators (/) before returning
file(TO_CMAKE_PATH ${7ZIP_EXTRACT_DIR} 7ZIP_EXTRACT_DIR)
# Actual 7-Zip directory is nested inside the extract directory.
set(DOWNLOADED_7ZIP_DIR ${7ZIP_EXTRACT_DIR}/Files/7-Zip PARENT_SCOPE)
endfunction()

View File

@ -1,129 +0,0 @@
# Downloads and extracts the Clang archive for the current system from
# https://releases.llvm.org
#
# Returns the extracted Clang archive directory in DOWNLOADED_CLANG_DIR
#
# Downloads 7-Zip to extract Clang if it isn't available in the PATH
function(download_and_extract_clang CLANG_DOWNLOAD_LOCATION)
set(CLANG_VERSION 7.0.0)
set(CLANG_ARCHIVE_EXT .tar.xz)
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
# Default to Ubuntu 16.04
set(CLANG_ARCHIVE_NAME
clang+llvm-${CLANG_VERSION}-x86_64-linux-gnu-ubuntu-16.04)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
set(CLANG_ARCHIVE_NAME clang+llvm-${CLANG_VERSION}-x86_64-apple-darwin)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
set(CLANG_ARCHIVE_NAME LLVM-${CLANG_VERSION}-win64)
set(CLANG_ARCHIVE_EXT .exe)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
set(CLANG_ARCHIVE_NAME clang+llvm-${CLANG_VERSION}-amd64-unknown-freebsd11)
endif()
set(CLANG_ARCHIVE_FULL_NAME ${CLANG_ARCHIVE_NAME}${CLANG_ARCHIVE_EXT})
set(CLANG_ARCHIVE_FILE ${CLANG_DOWNLOAD_LOCATION}/${CLANG_ARCHIVE_FULL_NAME})
set(CLANG_ARCHIVE_EXTRACT_DIR ${CLANG_DOWNLOAD_LOCATION}/${CLANG_ARCHIVE_NAME})
set(CLANG_ARCHIVE_URL
https://releases.llvm.org/${CLANG_VERSION}/${CLANG_ARCHIVE_FULL_NAME})
set(CLANG_ARCHIVE_HASH_FILE
${CMAKE_SOURCE_DIR}/clang_archive_hashes/${CLANG_ARCHIVE_FULL_NAME}.SHA256)
# Exit if Clang is already downloaded and extracted
set(CLANG_ROOT ${CLANG_ARCHIVE_EXTRACT_DIR})
find_package(Clang ${CLANG_VERSION} QUIET)
if(Clang_FOUND)
message(STATUS "Clang already downloaded")
set(DOWNLOADED_CLANG_DIR ${CLANG_ARCHIVE_EXTRACT_DIR} PARENT_SCOPE)
return()
endif()
if(NOT CLANG_ARCHIVE_NAME)
message(FATAL_ERROR "No Clang archive url specified for current platform \
(${CMAKE_SYSTEM_NAME}). Please file an issue to get it added.")
endif()
if(NOT EXISTS ${CLANG_ARCHIVE_HASH_FILE})
message(FATAL_ERROR "No SHA256 hash available for the current platform \
(${CMAKE_SYSTEM_NAME}) + clang version (${CLANG_VERSION}) combination. Please \
file an issue to get it added.")
endif()
# Download Clang archive
message(STATUS "Downloading Clang ${CLANG_VERSION} (${CLANG_ARCHIVE_URL}) ...")
file(DOWNLOAD ${CLANG_ARCHIVE_URL} ${CLANG_ARCHIVE_FILE}
STATUS CLANG_ARCHIVE_DOWNLOAD_RESULT)
# Abort if download failed
list(GET ${CLANG_ARCHIVE_DOWNLOAD_RESULT} 0 ERROR_CODE)
if(${ERROR_CODE})
list(GET ${CLANG_ARCHIVE_DOWNLOAD_RESULT} 1 ERROR_STRING)
message(FATAL_ERROR ${ERROR_STRING})
endif()
# Retrieve expected hash from file and strip newline
file(READ ${CLANG_ARCHIVE_HASH_FILE} CLANG_ARCHIVE_EXPECTED_HASH)
string(STRIP ${CLANG_ARCHIVE_EXPECTED_HASH} CLANG_ARCHIVE_EXPECTED_HASH)
# Calculate actual hash
file(SHA256 ${CLANG_ARCHIVE_FILE} CLANG_ARCHIVE_HASH)
# Abort if hashes do not match
if(NOT ${CLANG_ARCHIVE_EXPECTED_HASH} STREQUAL ${CLANG_ARCHIVE_HASH})
message(FATAL_ERROR "SHA256 hash of downloaded Clang does not match \
expected hash. Remove the build directory and try running CMake again. If this \
keeps happening, file an issue to report the problem.")
endif()
if(${CLANG_ARCHIVE_EXT} STREQUAL .exe)
# Download and extract 7-zip if not found in PATH
find_program(7ZIP_EXECUTABLE 7z)
if(NOT 7ZIP_EXECUTABLE)
message(STATUS "7-Zip not found in PATH")
include(DownloadAndExtract7zip)
download_and_extract_7zip(${CLANG_DOWNLOAD_LOCATION})
find_program(7ZIP_EXECUTABLE
NAMES 7z
NO_DEFAULT_PATH
PATHS ${DOWNLOADED_7ZIP_DIR}
)
else()
message(STATUS "7-Zip found in PATH")
endif()
message(STATUS "Extracting downloaded Clang with 7-Zip ...")
# Avoid running the Clang installer by extracting the exe with 7-Zip
execute_process(
COMMAND ${7ZIP_EXECUTABLE} x
-o${CLANG_ARCHIVE_EXTRACT_DIR}
-xr!$PLUGINSDIR ${CLANG_ARCHIVE_FILE}
WORKING_DIRECTORY ${CLANG_DOWNLOAD_LOCATION}
OUTPUT_QUIET
)
elseif(${CLANG_ARCHIVE_EXT} STREQUAL .tar.xz)
message(STATUS "Extracting downloaded Clang with CMake built-in tar ...")
# CMake has builtin support for tar via the -E flag
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar -xf ${CLANG_ARCHIVE_FILE}
# Specify working directory to allow running cmake from
# everywhere
# (example: cmake -H"$HOME/cquery" -B"$home/cquery/build")
WORKING_DIRECTORY ${CLANG_DOWNLOAD_LOCATION}
OUTPUT_QUIET
)
endif()
set(DOWNLOADED_CLANG_DIR ${CLANG_ARCHIVE_EXTRACT_DIR} PARENT_SCOPE)
endfunction()

View File

@ -1,154 +0,0 @@
#.rst
# FindClang
# ---------
#
# Find Clang and LLVM libraries required by ccls
#
# Results are reported in the following variables::
#
# Clang_FOUND - True if headers and requested libraries were found
# Clang_EXECUTABLE - Clang executable
# Clang_RESOURCE_DIR - Clang resource directory
# Clang_VERSION - Clang version as reported by Clang executable
#
# The following :prop_tgt:`IMPORTED` targets are also defined::
#
# Clang::Clang - Target for all required Clang libraries and headers
#
# This module reads hints about which libraries to look for and where to find
# them from the following variables::
#
# CLANG_ROOT - If set, only look for Clang components in CLANG_ROOT
#
# Example to link against Clang target::
#
# target_link_libraries(<target> PRIVATE Clang::Clang)
### Definitions
# Wrapper macro's around the find_* macro's from CMake that only search in
# CLANG_ROOT if it is defined
macro(_Clang_find_library VAR NAME)
# Windows needs lib prefix
if (CLANG_ROOT)
find_library(${VAR} NAMES ${NAME} lib${NAME}
NO_DEFAULT_PATH PATHS ${CLANG_ROOT} PATH_SUFFIXES lib)
else()
find_library(${VAR} NAMES ${NAME} lib${NAME})
endif()
endmacro()
macro(_Clang_find_add_library NAME)
_Clang_find_library(${NAME}_LIBRARY ${NAME})
list(APPEND _Clang_LIBRARIES ${${NAME}_LIBRARY})
endmacro()
macro(_Clang_find_path VAR INCLUDE_FILE)
if (CLANG_ROOT)
find_path(${VAR} ${INCLUDE_FILE}
NO_DEFAULT_PATH PATHS ${CLANG_ROOT} PATH_SUFFIXES include)
else()
find_path(${VAR} ${INCLUDE_FILE})
endif()
endmacro()
macro(_Clang_find_program VAR NAME)
if (CLANG_ROOT)
find_program(${VAR} ${NAME}
NO_DEFAULT_PATH PATHS ${CLANG_ROOT} PATH_SUFFIXES bin)
else()
find_program(${VAR} ${NAME})
endif()
endmacro()
### Start
set(_Clang_REQUIRED_VARS Clang_LIBRARY Clang_INCLUDE_DIR Clang_EXECUTABLE
Clang_RESOURCE_DIR Clang_VERSION
LLVM_INCLUDE_DIR LLVM_BUILD_INCLUDE_DIR)
_Clang_find_library(Clang_LIBRARY clangIndex)
_Clang_find_add_library(clangFormat)
_Clang_find_add_library(clangTooling)
# TODO Remove after dropping clang 6
_Clang_find_library(clangToolingInclusions_LIBRARY clangToolingInclusions)
if (clangToolingInclusions_LIBRARY)
list(APPEND _Clang_LIBRARIES ${clangToolingInclusions_LIBRARY})
endif()
_Clang_find_add_library(clangToolingCore)
_Clang_find_add_library(clangRewrite)
_Clang_find_add_library(clangFrontend)
_Clang_find_add_library(clangParse)
_Clang_find_add_library(clangSerialization)
_Clang_find_add_library(clangSema)
_Clang_find_add_library(clangAnalysis)
_Clang_find_add_library(clangEdit)
_Clang_find_add_library(clangAST)
_Clang_find_add_library(clangLex)
_Clang_find_add_library(clangDriver)
_Clang_find_add_library(clangBasic)
if(USE_SHARED_LLVM)
_Clang_find_add_library(LLVM)
else()
_Clang_find_add_library(LLVMMCParser)
_Clang_find_add_library(LLVMMC)
_Clang_find_add_library(LLVMBitReader)
_Clang_find_add_library(LLVMOption)
_Clang_find_add_library(LLVMProfileData)
_Clang_find_add_library(LLVMCore)
_Clang_find_add_library(LLVMBinaryFormat)
_Clang_find_add_library(LLVMSupport)
_Clang_find_add_library(LLVMDemangle)
endif()
_Clang_find_path(Clang_INCLUDE_DIR clang-c/Index.h)
_Clang_find_path(Clang_BUILD_INCLUDE_DIR clang/Driver/Options.inc)
_Clang_find_path(LLVM_INCLUDE_DIR llvm/PassInfo.h)
_Clang_find_path(LLVM_BUILD_INCLUDE_DIR llvm/Config/llvm-config.h)
_Clang_find_program(Clang_EXECUTABLE clang)
if(Clang_EXECUTABLE)
# Find Clang resource directory with Clang executable
execute_process(COMMAND ${Clang_EXECUTABLE} -print-resource-dir
RESULT_VARIABLE _Clang_FIND_RESOURCE_DIR_RESULT
OUTPUT_VARIABLE Clang_RESOURCE_DIR
ERROR_VARIABLE _Clang_FIND_RESOURCE_DIR_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(_Clang_FIND_RESOURCE_DIR_RESULT)
message(FATAL_ERROR "Error retrieving Clang resource directory with Clang \
executable. Output:\n ${_Clang_FIND_RESOURCE_DIR_ERROR}")
endif()
# Find Clang version
set(_Clang_VERSION_REGEX "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
execute_process(
COMMAND ${Clang_EXECUTABLE} --version
OUTPUT_VARIABLE Clang_VERSION
)
string(REGEX MATCH ${_Clang_VERSION_REGEX} Clang_VERSION ${Clang_VERSION})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Clang
FOUND_VAR Clang_FOUND
REQUIRED_VARS ${_Clang_REQUIRED_VARS}
VERSION_VAR Clang_VERSION
)
if(Clang_FOUND AND NOT TARGET Clang::Clang)
add_library(Clang::Clang UNKNOWN IMPORTED)
set_target_properties(Clang::Clang PROPERTIES
IMPORTED_LOCATION ${Clang_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES "${Clang_INCLUDE_DIR};${Clang_BUILD_INCLUDE_DIR};${LLVM_INCLUDE_DIR};${LLVM_BUILD_INCLUDE_DIR}")
if(NOT MSVC)
find_package(Curses REQUIRED)
find_package(ZLIB REQUIRED)
endif()
set_property(TARGET Clang::Clang PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES "${_Clang_LIBRARIES};${CURSES_LIBRARIES};${ZLIB_LIBRARIES}")
if(MINGW)
set_property(TARGET Clang::Clang APPEND_STRING PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES ";version")
endif()
endif()

View File

@ -1,4 +1,10 @@
/*
OUTPUT:
{}
{
"includes": [],
"skipped_ranges": [],
"usr2func": [],
"usr2type": [],
"usr2var": []
}
*/

View File

@ -11,7 +11,7 @@ OUTPUT:
"usr2func": [],
"usr2type": [{
"usr": 15041163540773201510,
"detailed_name": "class Foo",
"detailed_name": "class Foo {}",
"qual_name_offset": 6,
"short_name": "Foo",
"spell": "3:7-3:10|3:1-3:13|2|-1",
@ -21,7 +21,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": ["1:7-1:10|1:1-1:10|1|-1", "2:7-2:10|2:1-2:10|1|-1", "4:7-4:10|4:1-4:10|1|-1"],
"derived": [],
"instances": [],

View File

@ -36,9 +36,8 @@ OUTPUT:
"spell": "6:6-6:9|6:1-9:2|2|-1",
"bases": [],
"vars": [10983126130596230582, 17165811951126099095],
"callees": ["7:7-7:8|3385168158331140247|3|16676", "7:7-7:8|3385168158331140247|3|16676", "8:17-8:20|3385168158331140247|3|16676", "8:17-8:20|3385168158331140247|3|16676"],
"kind": 12,
"parent_kind": 0,
"callees": ["7:7-7:8|3385168158331140247|3|16676", "7:7-7:8|3385168158331140247|3|16676",
"8:17-8:20|3385168158331140247|3|16676", "8:17-8:20|3385168158331140247|3|16676"], "kind": 12, "parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -56,7 +55,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [10983126130596230582, 17165811951126099095],

View File

@ -43,7 +43,7 @@ OUTPUT:
"vars": [1893354193220338759],
"callees": ["8:7-8:8|3385168158331140247|3|16676", "8:7-8:8|3385168158331140247|3|16676"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -76,7 +76,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [1893354193220338759],

View File

@ -20,9 +20,8 @@ OUTPUT:
"spell": "5:6-5:10|5:1-8:2|2|-1",
"bases": [],
"vars": [449111627548814328, 17097499197730163115],
"callees": ["6:8-6:12|10530961286677896857|3|16676", "6:8-6:12|10530961286677896857|3|16676", "7:15-7:19|10530961286677896857|3|16676", "7:15-7:19|10530961286677896857|3|16676"],
"kind": 12,
"parent_kind": 0,
"callees": ["6:8-6:12|10530961286677896857|3|16676", "6:8-6:12|10530961286677896857|3|16676",
"7:15-7:19|10530961286677896857|3|16676", "7:15-7:19|10530961286677896857|3|16676"], "kind": 12, "parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -55,7 +54,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [449111627548814328, 17097499197730163115],

View File

@ -29,6 +29,22 @@ OUTPUT:
"uses": []
}],
"usr2type": [{
"usr": 9174142900507230378,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["3:16-3:17|3:10-3:17|1|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 15041163540773201510,
"detailed_name": "struct Foo {}",
"qual_name_offset": 7,
@ -40,7 +56,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -101,7 +101,7 @@ OUTPUT: make_functions.h
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -118,7 +118,7 @@ OUTPUT: make_functions.h
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -157,7 +157,7 @@ OUTPUT: make_functions.cc
"vars": [3908732770590594660],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -170,9 +170,8 @@ OUTPUT: make_functions.cc
"spell": "13:6-13:14|13:1-18:2|2|-1",
"bases": [],
"vars": [],
"callees": ["14:3-14:13|15793662558620604611|3|16420", "15:3-15:13|15793662558620604611|3|16420", "16:3-16:13|15793662558620604611|3|16420", "17:3-17:14|2532818908869373467|3|16420"],
"kind": 12,
"parent_kind": 0,
"callees": ["14:3-14:13|15793662558620604611|3|16420", "15:3-15:13|15793662558620604611|3|16420",
"16:3-16:13|15793662558620604611|3|16420", "17:3-17:14|2532818908869373467|3|16420"], "kind": 12, "parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -215,14 +214,14 @@ OUTPUT: make_functions.cc
"vars": [8463700030555379526],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": ["14:3-14:13|16420|-1", "15:3-15:13|16420|-1", "16:3-16:13|16420|-1"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -238,7 +237,7 @@ OUTPUT: make_functions.cc
"instances": [180270746871803062],
"uses": []
}, {
"usr": 87,
"usr": 488,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -253,6 +252,70 @@ OUTPUT: make_functions.cc
"derived": [],
"instances": [180270746871803062],
"uses": []
}, {
"usr": 3337128087216004141,
"detailed_name": "Args",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["8:35-8:39|8:23-8:39|1|-1"],
"derived": [],
"instances": [],
"uses": ["9:16-9:20|4|-1"]
}, {
"usr": 9281343527065946499,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["3:20-3:21|3:11-3:21|1|-1"],
"derived": [],
"instances": [],
"uses": ["4:1-4:2|4|-1"]
}, {
"usr": 10771590811355716928,
"detailed_name": "Args",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["3:35-3:39|3:23-3:39|1|-1"],
"derived": [],
"instances": [],
"uses": ["4:15-4:19|4|-1"]
}, {
"usr": 11897454629873246477,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["8:20-8:21|8:11-8:21|1|-1"],
"derived": [],
"instances": [],
"uses": ["9:1-9:2|4|-1"]
}, {
"usr": 12993848456528750350,
"detailed_name": "struct Bar {}",
@ -292,7 +355,7 @@ OUTPUT: make_functions.cc
"qual_name_offset": 4,
"short_name": "args",
"spell": "9:24-9:28|9:16-9:28|1026|-1",
"type": 87,
"type": 488,
"kind": 253,
"parent_kind": 12,
"storage": 0,

View File

@ -13,7 +13,7 @@ OUTPUT:
"usr2func": [],
"usr2type": [{
"usr": 15041163540773201510,
"detailed_name": "class Foo",
"detailed_name": "class Foo {}",
"qual_name_offset": 6,
"short_name": "Foo",
"spell": "3:7-3:10|3:1-3:13|2|-1",
@ -23,7 +23,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": ["1:7-1:10|1:1-1:10|1|-1", "2:7-2:10|2:1-2:10|1|-1", "4:7-4:10|4:1-4:10|1|-1"],
"derived": [],
"instances": [],

View File

@ -9,7 +9,7 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -39,7 +39,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -51,7 +51,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "foo",
"spell": "2:7-2:10|2:3-2:10|1026|-1",
"type": 53,
"type": 452,
"kind": 8,
"parent_kind": 5,
"storage": 0,

View File

@ -11,7 +11,7 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -38,7 +38,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -50,8 +50,8 @@ OUTPUT:
"qual_name_offset": 11,
"short_name": "foo",
"spell": "5:10-5:13|5:1-5:13|1026|-1",
"type": 53,
"kind": 13,
"type": 452,
"kind": 8,
"parent_kind": 5,
"storage": 2,
"declarations": ["2:14-2:17|2:3-2:17|1025|-1"],

View File

@ -19,7 +19,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": ["1:6-1:9|1:1-1:11|1|-1", "2:6-2:9|2:1-2:11|1|-1", "4:6-4:9|4:1-4:11|1|-1"],
"derived": [],

View File

@ -16,17 +16,12 @@ OUTPUT:
"short_name": "foo",
"spell": "5:5-5:8|5:1-5:36|2|-1",
"bases": [],
"vars": [14555488990109936920, 10963664335057337329],
"callees": [],
"kind": 12,
"parent_kind": 0,
"storage": 0,
"declarations": ["1:5-1:8|1:1-1:18|1|-1", "2:5-2:8|2:1-3:16|1|-1", "4:5-4:8|4:1-4:26|1|-1"],
"derived": [],
"uses": []
"vars": [7892962471424670909, 17130001153697799035, 16879535361702603834, 10198518325066875844,
14555488990109936920, 10963664335057337329], "callees": [], "kind": 12, "parent_kind": 1, "storage": 0, "declarations":
["1:5-1:8|1:1-1:18|1|-1", "2:5-2:8|2:1-3:16|1|-1", "4:5-4:8|4:1-4:26|1|-1"], "derived": [], "uses": []
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -39,16 +34,40 @@ OUTPUT:
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [14555488990109936920, 10963664335057337329],
"uses": []
"instances": [7892962471424670909, 17130001153697799035, 16879535361702603834, 10198518325066875844,
14555488990109936920, 10963664335057337329], "uses": []
}],
"usr2var": [{
"usr": 7892962471424670909,
"detailed_name": "int aa",
"qual_name_offset": 4,
"short_name": "aa",
"spell": "2:13-2:15|2:9-2:15|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 10198518325066875844,
"detailed_name": "int bbb",
"qual_name_offset": 4,
"short_name": "bbb",
"spell": "4:22-4:25|4:18-4:25|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 10963664335057337329,
"detailed_name": "int b",
"qual_name_offset": 4,
"short_name": "b",
"spell": "5:20-5:21|5:16-5:21|1026|-1",
"type": 53,
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
@ -60,7 +79,31 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"spell": "5:13-5:14|5:9-5:14|1026|-1",
"type": 53,
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 16879535361702603834,
"detailed_name": "int aaa",
"qual_name_offset": 4,
"short_name": "aaa",
"spell": "4:13-4:16|4:9-4:16|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 17130001153697799035,
"detailed_name": "int bb",
"qual_name_offset": 4,
"short_name": "bb",
"spell": "3:13-3:15|3:9-3:15|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,

View File

@ -67,7 +67,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -22,11 +22,11 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 252,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": []
"uses": ["2:18-2:25|4|-1"]
}, {
"usr": 16985894625255407295,
"detailed_name": "enum class Foo : uint8_t {}",
@ -45,7 +45,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -21,7 +21,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -36,7 +36,7 @@ OUTPUT:
"spell": "2:3-2:4|2:3-2:4|1026|-1",
"type": 16985894625255407295,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -48,7 +48,7 @@ OUTPUT:
"spell": "3:3-3:4|3:3-3:9|1026|-1",
"type": 16985894625255407295,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -34,7 +34,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -51,11 +51,11 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 252,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": []
"uses": ["8:16-8:23|4|-1"]
}, {
"usr": 16985894625255407295,
"detailed_name": "enum Foo : int {}",
@ -68,7 +68,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -83,7 +83,7 @@ OUTPUT:
"spell": "2:3-2:4|2:3-2:4|1026|-1",
"type": 16985894625255407295,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -95,7 +95,7 @@ OUTPUT:
"spell": "3:3-3:4|3:3-3:9|1026|-1",
"type": 16985894625255407295,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -29,7 +29,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [10677751717622394455],
@ -57,7 +57,7 @@ OUTPUT:
"spell": "6:5-6:6|6:1-6:15|2|-1",
"type": 16985894625255407295,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -26,7 +26,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -39,11 +39,11 @@ OUTPUT:
"spell": "5:8-5:11|5:1-7:2|2|-1",
"bases": [],
"funcs": [],
"types": [13938528237873543349],
"types": [14891869080606636243, 13938528237873543349],
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [12028309045033782423],
@ -60,7 +60,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -82,6 +82,22 @@ OUTPUT:
"derived": [],
"instances": [16721564935990383768],
"uses": ["9:9-9:14|4|-1"]
}, {
"usr": 14891869080606636243,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["4:19-4:20|4:10-4:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 12028309045033782423,
@ -91,7 +107,7 @@ OUTPUT:
"spell": "10:8-10:9|10:1-10:9|2|-1",
"type": 10528472276654770367,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -103,7 +119,7 @@ OUTPUT:
"spell": "9:15-9:16|9:1-9:16|2|-1",
"type": 13938528237873543349,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -11,7 +11,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "foo",
"bases": [],
"vars": [],
"vars": [8158338140950637730, 17005964293310927058],
"callees": [],
"kind": 12,
"parent_kind": 0,
@ -20,7 +20,47 @@ OUTPUT:
"derived": [],
"uses": []
}],
"usr2type": [],
"usr2var": []
"usr2type": [{
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [8158338140950637730, 17005964293310927058],
"uses": []
}],
"usr2var": [{
"usr": 8158338140950637730,
"detailed_name": "int a",
"qual_name_offset": 4,
"short_name": "a",
"spell": "1:14-1:15|1:10-1:15|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 17005964293310927058,
"detailed_name": "int b",
"qual_name_offset": 4,
"short_name": "b",
"spell": "1:21-1:22|1:17-1:22|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}]
}
*/

View File

@ -17,7 +17,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": ["1:6-1:9|1:1-1:11|1|-1"],
"derived": [],

View File

@ -15,7 +15,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],

View File

@ -19,7 +19,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10963370434658308541],
"instances": [],
@ -36,7 +36,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -19,6 +19,22 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [],
"usr2type": [{
"usr": 444,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [2713508113307684499, 12990052348105569112],
"uses": []
}, {
"usr": 5863733211528032190,
"detailed_name": "class Derived1 : Base1<T> {}",
"qual_name_offset": 6,
@ -30,11 +46,27 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10963370434658308541],
"instances": [],
"uses": ["13:43-13:51|2052|-1"]
}, {
"usr": 7916588271848318236,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["10:19-10:20|10:10-10:20|1025|-1"],
"derived": [],
"instances": [],
"uses": ["11:24-11:25|4|-1"]
}, {
"usr": 10651399730831737929,
"detailed_name": "class Derived2 : Base2<T> {}",
@ -43,11 +75,11 @@ OUTPUT:
"spell": "11:7-11:15|11:1-11:29|2|-1",
"bases": [11118288764693061434],
"funcs": [],
"types": [],
"types": [7916588271848318236],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10963370434658308541],
"instances": [],
@ -64,11 +96,11 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["13:33-13:40|2052|-1", "13:65-13:72|2052|-1"]
"uses": ["13:33-13:40|4|-1", "13:65-13:72|4|-1"]
}, {
"usr": 11118288764693061434,
"detailed_name": "class Base2 {}",
@ -77,11 +109,11 @@ OUTPUT:
"spell": "5:7-5:12|5:1-5:15|2|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [11972372958367790157],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10651399730831737929, 10963370434658308541],
"instances": [],
@ -98,12 +130,50 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [5863733211528032190, 10963370434658308541],
"instances": [],
"uses": ["8:18-8:23|2052|-1", "13:17-13:22|2052|-1"]
}, {
"usr": 11972372958367790157,
"detailed_name": "C",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["4:19-4:20|4:10-4:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": []
"usr2var": [{
"usr": 2713508113307684499,
"detailed_name": "unsigned int Base1::C",
"qual_name_offset": 13,
"short_name": "C",
"type": 444,
"kind": 253,
"parent_kind": 5,
"storage": 0,
"declarations": ["1:23-1:24|1:10-1:24|1025|-1"],
"uses": []
}, {
"usr": 12990052348105569112,
"detailed_name": "unsigned int Derived1::T",
"qual_name_offset": 13,
"short_name": "T",
"type": 444,
"kind": 253,
"parent_kind": 5,
"storage": 0,
"declarations": ["7:23-7:24|7:10-7:24|1025|-1"],
"uses": ["8:24-8:25|4|-1"]
}]
}
*/

View File

@ -21,7 +21,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [11863524815063131483, 14022569716337624303],
"instances": [],
@ -38,7 +38,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -55,7 +55,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10963370434658308541],
"instances": [],
@ -72,7 +72,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10963370434658308541],
"instances": [],

View File

@ -12,7 +12,7 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [{
"usr": 6666242542855173890,
"detailed_name": "void Derived::foo()",
"detailed_name": "void Derived::foo() override",
"qual_name_offset": 5,
"short_name": "foo",
"spell": "5:8-5:11|5:3-5:25|5186|-1",
@ -52,7 +52,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10963370434658308541],
"instances": [],
@ -69,7 +69,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -34,7 +34,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -30,7 +30,7 @@ OUTPUT:
"uses": []
}, {
"usr": 13164726294460837993,
"detailed_name": "Derived::~Derived() noexcept",
"detailed_name": "Derived::~Derived() noexcept override",
"qual_name_offset": 0,
"short_name": "~Derived",
"spell": "8:3-8:11|8:3-8:26|5186|-1",
@ -71,7 +71,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -88,7 +88,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10963370434658308541],
"instances": [],
@ -105,7 +105,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [10963370434658308541],
"instances": [],

View File

@ -24,20 +24,16 @@ OUTPUT:
"spell": "1:6-1:9|1:1-12:2|2|-1",
"bases": [],
"vars": [12666114896600231317, 2981279427664991319],
"callees": ["9:14-9:15|17926497908620168464|3|16420", "10:14-10:15|17926497908620168464|3|16420", "11:14-11:15|17926497908620168464|3|16420"],
"kind": 12,
"parent_kind": 0,
"storage": 0,
"declarations": [],
"derived": [],
"uses": []
"callees": ["9:14-9:15|17926497908620168464|3|16420", "10:14-10:15|17926497908620168464|3|16420",
"11:14-11:15|17926497908620168464|3|16420"], "kind": 12, "parent_kind": 1, "storage": 0, "declarations": [], "derived":
[], "uses": []
}, {
"usr": 17926497908620168464,
"detailed_name": "inline void foo()::(anon class)::operator()(int y) const",
"qual_name_offset": 12,
"detailed_name": "inline constexpr void foo()::(anon class)::operator()(int y) const",
"qual_name_offset": 22,
"short_name": "operator()",
"bases": [],
"vars": [],
"vars": [12879188959314906706, 12879188959314906706],
"callees": [],
"kind": 6,
"parent_kind": 0,
@ -47,7 +43,7 @@ OUTPUT:
"uses": ["9:14-9:15|16420|-1", "10:14-10:15|16420|-1", "11:14-11:15|16420|-1"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -60,7 +56,7 @@ OUTPUT:
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [12666114896600231317],
"instances": [12666114896600231317, 12879188959314906706, 12879188959314906706],
"uses": []
}, {
"usr": 14635009347499519042,
@ -84,7 +80,7 @@ OUTPUT:
"detailed_name": "(lambda) dosomething",
"qual_name_offset": 9,
"short_name": "dosomething",
"hover": "(lambda) dosomething",
"hover": "(lambda) dosomething = [&x](int y) {\n ++x;\n ++y;\n }",
"spell": "4:8-4:19|4:3-7:4|2|-1",
"type": 14635009347499519042,
"kind": 13,
@ -98,7 +94,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "x",
"spell": "2:7-2:8|2:3-2:8|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 12,
"storage": 0,
@ -109,8 +105,8 @@ OUTPUT:
"detailed_name": "int y",
"qual_name_offset": 4,
"short_name": "y",
"spell": "4:31-4:32|4:27-4:32|2|-1",
"type": 0,
"spell": "4:31-4:32|4:27-4:32|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 6,
"storage": 0,

View File

@ -26,7 +26,7 @@ OUTPUT:
"vars": [],
"callees": ["12:5-12:10|14400399977994209582|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": ["12:1-12:20|12:1-12:4|1|-1"],
"derived": [],
@ -41,14 +41,14 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": ["12:5-12:10|16420|-1", "12:5-12:10|64|0"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -71,9 +71,9 @@ OUTPUT:
"short_name": "make2",
"hover": "const int make2 = 5",
"spell": "9:11-9:16|9:1-9:20|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": ["12:14-12:19|12|-1", "12:14-12:19|64|0"]

View File

@ -29,7 +29,7 @@ OUTPUT:
"uses": ["5:12-5:15|64|0"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -56,7 +56,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -95,9 +95,9 @@ OUTPUT:
"short_name": "x",
"hover": "int x = A",
"spell": "8:5-8:6|8:1-8:10|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -38,7 +38,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -37,7 +37,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -35,7 +35,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -22,7 +22,7 @@ OUTPUT: funky_enum.h
"spell": "4:1-4:2|4:1-4:2|1026|-1",
"type": 16985894625255407295,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -36,7 +36,7 @@ OUTPUT: funky_enum.h
"spell": "6:1-6:2|6:1-6:2|1026|-1",
"type": 16985894625255407295,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -50,7 +50,7 @@ OUTPUT: funky_enum.h
"spell": "5:1-5:2|5:1-5:2|1026|-1",
"type": 16985894625255407295,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -76,7 +76,7 @@ OUTPUT: funky_enum.cc
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -19,14 +19,14 @@ OUTPUT: header.h
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": []
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -49,11 +49,11 @@ OUTPUT: header.h
"spell": "13:8-13:12|13:1-13:15|2|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [873975420211778410],
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -70,11 +70,27 @@ OUTPUT: header.h
"vars": [],
"alias_of": 16750616846959666305,
"kind": 252,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 873975420211778410,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["12:20-12:21|12:11-12:21|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 4481210672785600703,
"detailed_name": "enum Foo3 {}",
@ -87,7 +103,7 @@ OUTPUT: header.h
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -104,11 +120,27 @@ OUTPUT: header.h
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [16750616846959666305],
"instances": [],
"uses": ["5:26-5:30|2052|-1"]
}, {
"usr": 11499613911650781751,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["9:20-9:21|9:11-9:21|1|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 16750616846959666305,
"detailed_name": "struct SameFileDerived : Base {}",
@ -121,7 +153,7 @@ OUTPUT: header.h
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -133,9 +165,9 @@ OUTPUT: header.h
"qual_name_offset": 4,
"short_name": "Foo4",
"spell": "17:5-17:9|17:1-17:9|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -148,7 +180,7 @@ OUTPUT: header.h
"spell": "15:13-15:14|15:13-15:14|1026|-1",
"type": 4481210672785600703,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -161,7 +193,7 @@ OUTPUT: header.h
"spell": "15:19-15:20|15:19-15:20|1026|-1",
"type": 4481210672785600703,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -171,9 +203,9 @@ OUTPUT: header.h
"qual_name_offset": 11,
"short_name": "Foo5",
"spell": "18:12-18:16|18:1-18:16|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 2,
"declarations": [],
"uses": []
@ -186,7 +218,7 @@ OUTPUT: header.h
"spell": "15:16-15:17|15:16-15:17|1026|-1",
"type": 4481210672785600703,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -209,7 +241,7 @@ OUTPUT: impl.cc
"vars": [],
"callees": ["4:3-4:7|11650481237659640387|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],

View File

@ -44,7 +44,7 @@ OUTPUT: simple_impl.cc
"vars": [],
"callees": ["4:3-4:9|16236105532929924676|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],

View File

@ -34,7 +34,7 @@ OUTPUT: static.h
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -13,7 +13,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "foo",
"bases": [],
"vars": [],
"vars": [11261617957951052010, 6927976078246688450],
"callees": [],
"kind": 12,
"parent_kind": 0,
@ -23,6 +23,22 @@ OUTPUT:
"uses": []
}],
"usr2type": [{
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [11261617957951052010, 6927976078246688450],
"uses": []
}, {
"usr": 2029211996748007610,
"detailed_name": "namespace hello {}",
"qual_name_offset": 10,
@ -39,6 +55,30 @@ OUTPUT:
"instances": [],
"uses": []
}],
"usr2var": []
"usr2var": [{
"usr": 6927976078246688450,
"detailed_name": "int b",
"qual_name_offset": 4,
"short_name": "b",
"spell": "2:21-2:22|2:17-2:22|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 11261617957951052010,
"detailed_name": "int a",
"qual_name_offset": 4,
"short_name": "a",
"spell": "2:14-2:15|2:10-2:15|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}]
}
*/

View File

@ -28,14 +28,14 @@ OUTPUT:
"vars": [6030927277961448585, 7657277353101371136],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": []
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -76,7 +76,7 @@ OUTPUT:
"types": [],
"vars": [],
"alias_of": 14450849931009540802,
"kind": 252,
"kind": 3,
"parent_kind": 0,
"declarations": ["9:11-9:14|9:1-9:30|1|-1"],
"derived": [],
@ -125,7 +125,7 @@ OUTPUT:
"short_name": "a",
"hover": "int a = foo::bar::baz::qux",
"spell": "12:7-12:8|12:3-12:29|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 12,
"storage": 0,
@ -138,7 +138,7 @@ OUTPUT:
"short_name": "b",
"hover": "int b = fbz::qux",
"spell": "13:7-13:8|13:3-13:19|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 12,
"storage": 0,
@ -151,7 +151,7 @@ OUTPUT:
"short_name": "qux",
"hover": "int foo::bar::baz::qux = 42",
"spell": "4:18-4:21|4:14-4:26|1026|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 3,
"storage": 0,

View File

@ -24,7 +24,7 @@ OUTPUT:
"vars": [],
"callees": ["7:7-7:13|17328473273923617489|3|16420", "9:3-9:9|17328473273923617489|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -46,7 +46,7 @@ OUTPUT:
"uses": ["7:7-7:13|16420|-1", "9:3-9:9|16420|-1"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -87,7 +87,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"spell": "3:19-3:20|3:15-3:20|1026|-1",
"type": 53,
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
@ -99,7 +99,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "Foo",
"spell": "2:7-2:10|2:3-2:10|1026|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 3,
"storage": 0,
@ -108,6 +108,3 @@ OUTPUT:
}]
}
*/

View File

@ -20,165 +20,128 @@ int main(void)
OUTPUT:
{
"includes": [],
"skipped_by_preprocessor": [],
"types": [{
"id": 0,
"usr": 11832280568361305387,
"detailed_name": "AClass",
"short_name": "AClass",
"kind": 7,
"spell": "7:17-7:23|-1|1|2",
"extent": "7:1-10:2|-1|1|0",
"parents": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [2],
"uses": ["14:3-14:9|-1|1|4", "14:23-14:29|-1|1|4"]
}, {
"id": 1,
"usr": 17,
"detailed_name": "",
"short_name": "",
"kind": 0,
"parents": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [0, 1],
"uses": []
}],
"funcs": [{
"id": 0,
"usr": 12775970426728664910,
"detailed_name": "AClass::test",
"short_name": "test",
"kind": 17,
"storage": 0,
"declarations": [{
"spelling": "2:11-2:15",
"extent": "2:3-2:16",
"content": "+ (void)test;",
"param_spellings": []
}],
"spell": "8:9-8:13|-1|1|2",
"extent": "8:1-8:16|-1|1|0",
"base": [],
"derived": [],
"locals": [],
"uses": [],
"callees": []
}, {
"id": 1,
"skipped_ranges": [],
"usr2func": [{
"usr": 4096877434426330804,
"detailed_name": "AClass::anInstanceMethod",
"detailed_name": "- (void)AClass::anInstanceMethod;",
"qual_name_offset": 2,
"short_name": "anInstanceMethod",
"kind": 16,
"spell": "9:9-9:25|9:1-9:28|1090|-1",
"bases": [],
"vars": [],
"callees": [],
"kind": 6,
"parent_kind": 11,
"storage": 0,
"declarations": [{
"spelling": "3:11-3:27",
"extent": "3:3-3:28",
"content": "- (void)anInstanceMethod;",
"param_spellings": []
}],
"spell": "9:9-9:25|-1|1|2",
"extent": "9:1-9:28|-1|1|0",
"base": [],
"declarations": ["3:11-3:27|3:3-3:28|1089|-1"],
"derived": [],
"locals": [],
"uses": ["15:13-15:29|4|3|64"],
"callees": []
"uses": ["15:13-15:29|24676|-1"]
}, {
"id": 2,
"usr": 12774569141855220778,
"detailed_name": "AClass::aProp",
"short_name": "aProp",
"kind": 16,
"storage": 0,
"declarations": [{
"spelling": "0:0-0:0",
"extent": "4:29-4:34",
"content": "aProp",
"param_spellings": []
}],
"extent": "4:29-4:34|-1|1|0",
"base": [],
"derived": [],
"locals": [],
"uses": [],
"callees": []
}, {
"id": 3,
"usr": 17992064398538597892,
"detailed_name": "AClass::setAProp:",
"short_name": "setAProp:",
"kind": 16,
"storage": 0,
"declarations": [{
"spelling": "0:0-0:0",
"extent": "4:29-4:34",
"content": "aProp",
"param_spellings": ["4:29-4:34"]
}],
"extent": "4:29-4:34|-1|1|0",
"base": [],
"derived": [],
"locals": [],
"uses": ["0:0-0:0|4|3|64"],
"callees": []
}, {
"id": 4,
"usr": 7033269674615638282,
"detailed_name": "int main()",
"usr": 7924728095432766067,
"detailed_name": "int main(void)",
"qual_name_offset": 4,
"short_name": "main",
"spell": "12:5-12:9|12:1-17:2|2|-1",
"bases": [],
"vars": [11068172662702654556],
"callees": ["15:13-15:29|4096877434426330804|3|24676", "16:12-16:17|17992064398538597892|3|24932"],
"kind": 12,
"storage": 1,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"spell": "12:5-12:9|-1|1|2",
"extent": "12:1-17:2|-1|1|0",
"base": [],
"derived": [],
"locals": [],
"uses": [],
"callees": ["15:13-15:29|1|3|64", "0:0-0:0|3|3|64"]
}],
"vars": [{
"id": 0,
"usr": 14842397373703114213,
"detailed_name": "int AClass::aProp",
"uses": []
}, {
"usr": 12774569141855220778,
"detailed_name": "- (int)AClass::aProp;",
"qual_name_offset": 2,
"short_name": "aProp",
"declarations": ["4:29-4:34|-1|1|1"],
"type": 1,
"uses": ["16:12-16:17|4|3|4"],
"kind": 19,
"storage": 0
"bases": [],
"vars": [],
"callees": [],
"kind": 6,
"parent_kind": 0,
"storage": 0,
"declarations": ["4:29-4:34|4:29-4:34|1345|-1"],
"derived": [],
"uses": []
}, {
"id": 1,
"usr": 17112602610366149042,
"detailed_name": "int AClass::_aProp",
"short_name": "_aProp",
"declarations": [],
"spell": "4:29-4:34|-1|1|2",
"extent": "4:29-4:34|-1|1|0",
"type": 1,
"uses": [],
"kind": 14,
"storage": 0
"usr": 12775970426728664910,
"detailed_name": "+ (void)AClass::test;",
"qual_name_offset": 2,
"short_name": "test",
"spell": "8:9-8:13|8:1-8:16|1090|-1",
"bases": [],
"vars": [],
"callees": [],
"kind": 6,
"parent_kind": 11,
"storage": 0,
"declarations": ["2:11-2:15|2:3-2:16|1089|-1"],
"derived": [],
"uses": []
}, {
"id": 2,
"usr": 6849095699869081177,
"usr": 17992064398538597892,
"detailed_name": "- (void)AClass::setAProp:(int)aProp;",
"qual_name_offset": 2,
"short_name": "setAProp:",
"bases": [],
"vars": [],
"callees": [],
"kind": 6,
"parent_kind": 0,
"storage": 0,
"declarations": ["4:29-4:34|4:29-4:34|1345|-1"],
"derived": [],
"uses": ["16:12-16:17|24932|-1"]
}],
"usr2type": [{
"usr": 11832280568361305387,
"detailed_name": "@implementation AClass\n@end",
"qual_name_offset": 16,
"short_name": "AClass",
"spell": "7:17-7:23|7:1-10:2|2|-1",
"bases": [],
"funcs": [12775970426728664910, 4096877434426330804, 12774569141855220778, 17992064398538597892],
"types": [14842397373703114213],
"vars": [],
"alias_of": 0,
"kind": 11,
"parent_kind": 1,
"declarations": ["1:12-1:18|1:1-5:5|1|-1"],
"derived": [],
"instances": [],
"uses": ["14:3-14:9|4|-1", "14:23-14:29|4|-1"]
}, {
"usr": 14842397373703114213,
"detailed_name": "@property(nonatomic, assign, unsafe_unretained, readwrite) int AClass::aProp;",
"qual_name_offset": 63,
"short_name": "aProp",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 7,
"parent_kind": 0,
"declarations": ["4:29-4:34|4:3-4:34|1025|-1"],
"derived": [],
"instances": [],
"uses": ["16:12-16:17|20|-1"]
}],
"usr2var": [{
"usr": 11068172662702654556,
"detailed_name": "AClass *instance",
"qual_name_offset": 8,
"short_name": "instance",
"hover": "AClass *instance = [AClass init]",
"declarations": [],
"spell": "14:11-14:19|4|3|2",
"extent": "14:3-14:35|4|3|2",
"spell": "14:11-14:19|14:3-14:35|2|-1",
"type": 0,
"uses": ["15:4-15:12|4|3|4", "16:3-16:11|4|3|4"],
"kind": 13,
"storage": 1
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": ["15:4-15:12|12|-1", "16:3-16:11|12|-1"]
}]
}
*/

View File

@ -31,7 +31,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "operator()",
"bases": [],
"vars": [],
"vars": [18194802024223591994, 3165816734756776484],
"callees": [],
"kind": 6,
"parent_kind": 0,
@ -70,6 +70,22 @@ OUTPUT:
"uses": []
}],
"usr2type": [{
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [18194802024223591994, 3165816734756776484],
"uses": []
}, {
"usr": 15041163540773201510,
"detailed_name": "class Foo {}",
"qual_name_offset": 6,
@ -81,12 +97,36 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["7:1-7:4|4|-1", "7:25-7:28|4|-1"]
}],
"usr2var": []
"usr2var": [{
"usr": 3165816734756776484,
"detailed_name": "int b",
"qual_name_offset": 4,
"short_name": "b",
"spell": "4:29-4:30|4:25-4:30|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 6,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 18194802024223591994,
"detailed_name": "int a",
"qual_name_offset": 4,
"short_name": "a",
"spell": "4:22-4:23|4:18-4:23|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 6,
"storage": 0,
"declarations": [],
"uses": []
}]
}
*/

View File

@ -13,7 +13,7 @@ OUTPUT: static_function_in_type.h
"skipped_ranges": [],
"usr2func": [{
"usr": 17019747379608639279,
"detailed_name": "static void ns::Foo::Register(ns::Manager *)",
"detailed_name": "static void ns::Foo::Register(Manager *)",
"qual_name_offset": 12,
"short_name": "Register",
"bases": [],
@ -87,7 +87,7 @@ OUTPUT: static_function_in_type.cc
"skipped_ranges": [],
"usr2func": [{
"usr": 17019747379608639279,
"detailed_name": "static void ns::Foo::Register(ns::Manager *)",
"detailed_name": "static void ns::Foo::Register(Manager *)",
"qual_name_offset": 12,
"short_name": "Register",
"spell": "5:11-5:19|5:1-6:2|1026|-1",
@ -153,8 +153,8 @@ OUTPUT: static_function_in_type.cc
}],
"usr2var": [{
"usr": 13569879755236306838,
"detailed_name": "ns::Manager *m",
"qual_name_offset": 13,
"detailed_name": "Manager *m",
"qual_name_offset": 9,
"short_name": "m",
"spell": "5:29-5:30|5:20-5:30|1026|-1",
"type": 1972401196751872203,

View File

@ -17,7 +17,7 @@ void hello();
OUTPUT:
{
"includes": [],
"skipped_ranges": ["2:1-5:1", "6:1-11:1", "12:1-15:1"],
"skipped_ranges": ["2:1-4:7", "6:1-10:7", "12:1-14:7"],
"usr2func": [],
"usr2type": [],
"usr2var": []

View File

@ -0,0 +1,307 @@
template <class T> struct type_trait {
const static bool value = false;
};
template <> struct type_trait<int> {
const static bool value = true;
};
template <class T>
concept Con1 = type_trait<T>::value;
constexpr int sizeFunc() { return 4; }
template <class T>
concept ConWithLogicalAnd = Con1<T> && sizeof(T) > sizeFunc();
namespace ns {
template <class T>
concept ConInNamespace = sizeof(T) > 4;
}
template <class T1, class T2>
concept ConTwoTemplateParams = ns::ConInNamespace<T1> && ConWithLogicalAnd<T2>;
/*
OUTPUT:
{
"includes": [],
"skipped_ranges": [],
"usr2func": [{
"usr": 3226866773869731400,
"detailed_name": "constexpr int sizeFunc()",
"qual_name_offset": 14,
"short_name": "sizeFunc",
"spell": "13:15-13:23|13:1-13:39|2|-1",
"bases": [],
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": ["16:52-16:60|36|-1"]
}],
"usr2type": [{
"usr": 436,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [3643386974125063532, 4683419091429829178],
"uses": []
}, {
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [15611304989063975809, 15197037962155352994, 7075924720131397743, 8419381068906673567],
"uses": []
}, {
"usr": 368613743269466510,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["19:17-19:18|19:11-19:18|1025|-1"],
"derived": [],
"instances": [],
"uses": ["20:33-20:34|4|-1"]
}, {
"usr": 1341599025369786548,
"detailed_name": "T1",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["23:17-23:19|23:11-23:19|1|-1"],
"derived": [],
"instances": [],
"uses": ["24:51-24:53|4|-1"]
}, {
"usr": 1789177110200181456,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["15:17-15:18|15:11-15:18|1|-1"],
"derived": [],
"instances": [],
"uses": ["16:34-16:35|4|-1", "16:47-16:48|4|-1"]
}, {
"usr": 4001289545226345448,
"detailed_name": "struct type_trait {}",
"qual_name_offset": 7,
"short_name": "type_trait",
"spell": "2:27-2:37|2:20-4:2|2|-1",
"bases": [],
"funcs": [],
"types": [13813325012676356715],
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 1,
"declarations": [],
"derived": [10139416838611429657],
"instances": [],
"uses": ["11:16-11:26|4|-1"]
}, {
"usr": 8987540007709901036,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["10:17-10:18|10:11-10:18|1|-1"],
"derived": [],
"instances": [],
"uses": ["11:27-11:28|4|-1"]
}, {
"usr": 10139416838611429657,
"detailed_name": "template<> struct type_trait<int> {}",
"qual_name_offset": 18,
"short_name": "type_trait",
"spell": "6:20-6:30|6:1-8:2|2|-1",
"bases": [4001289545226345448],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 10306412732558468540,
"detailed_name": "T2",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["23:27-23:29|23:21-23:29|1|-1"],
"derived": [],
"instances": [],
"uses": ["24:76-24:78|4|-1"]
}, {
"usr": 11072669167287398027,
"detailed_name": "namespace ns {}",
"qual_name_offset": 10,
"short_name": "ns",
"bases": [],
"funcs": [],
"types": [368613743269466510],
"vars": [{
"L": 7075924720131397743,
"R": -1
}],
"alias_of": 0,
"kind": 3,
"parent_kind": 0,
"declarations": ["18:11-18:13|18:1-21:2|1|-1"],
"derived": [],
"instances": [],
"uses": ["24:32-24:34|4|-1"]
}, {
"usr": 13813325012676356715,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["2:17-2:18|2:11-2:18|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 3643386974125063532,
"detailed_name": "static const bool type_trait::value",
"qual_name_offset": 18,
"short_name": "value",
"hover": "static const bool type_trait::value = false",
"type": 436,
"kind": 8,
"parent_kind": 23,
"storage": 2,
"declarations": ["3:21-3:26|3:3-3:34|1025|-1"],
"uses": ["11:31-11:36|4|-1"]
}, {
"usr": 4683419091429829178,
"detailed_name": "static const bool type_trait<int>::value",
"qual_name_offset": 18,
"short_name": "value",
"hover": "static const bool type_trait<int>::value = true",
"type": 436,
"kind": 8,
"parent_kind": 5,
"storage": 2,
"declarations": ["7:21-7:26|7:3-7:33|1025|-1"],
"uses": []
}, {
"usr": 7075924720131397743,
"detailed_name": "int ns::ConInNamespace",
"qual_name_offset": 4,
"short_name": "ConInNamespace",
"hover": "int ns::ConInNamespace = sizeof(T) > 4",
"spell": "20:9-20:23|20:1-20:39|1026|-1",
"type": 452,
"kind": 13,
"parent_kind": 3,
"storage": 0,
"declarations": [],
"uses": ["24:36-24:50|4|-1"]
}, {
"usr": 8419381068906673567,
"detailed_name": "int ConTwoTemplateParams",
"qual_name_offset": 4,
"short_name": "ConTwoTemplateParams",
"hover": "int ConTwoTemplateParams = ns::ConInNamespace<T1> && ConWithLogicalAnd<T2>",
"spell": "24:9-24:29|24:1-24:79|2|-1",
"type": 452,
"kind": 13,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 15197037962155352994,
"detailed_name": "int ConWithLogicalAnd",
"qual_name_offset": 4,
"short_name": "ConWithLogicalAnd",
"hover": "int ConWithLogicalAnd = Con1<T> && sizeof(T) > sizeFunc()",
"spell": "16:9-16:26|16:1-16:62|2|-1",
"type": 452,
"kind": 13,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": ["24:58-24:75|4|-1"]
}, {
"usr": 15611304989063975809,
"detailed_name": "int Con1",
"qual_name_offset": 4,
"short_name": "Con1",
"hover": "int Con1 = type_trait<T>::value",
"spell": "11:9-11:13|11:1-11:36|2|-1",
"type": 452,
"kind": 13,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": ["16:29-16:33|4|-1"]
}]
}
*/

View File

@ -29,6 +29,22 @@ OUTPUT:
"uses": []
}],
"usr2type": [{
"usr": 3122724794825267268,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:16-1:17|1:10-1:17|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 15041163540773201510,
"detailed_name": "struct Foo {}",
"qual_name_offset": 7,
@ -40,7 +56,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -53,11 +69,11 @@ OUTPUT:
"spell": "2:7-2:15|2:1-2:18|2|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [3122724794825267268],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -21,7 +21,7 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -53,6 +53,38 @@ OUTPUT:
"derived": [],
"instances": [4731849186641714451, 4731849186641714451],
"uses": ["6:22-6:29|4|-1", "6:44-6:51|4|-1", "10:18-10:25|4|-1"]
}, {
"usr": 2205716167465743256,
"detailed_name": "_",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["10:33-10:34|4|-1"]
}, {
"usr": 2743282246975181395,
"detailed_name": "_",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["4:21-4:22|4:12-4:22|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 11072669167287398027,
"detailed_name": "namespace ns {}",
@ -83,7 +115,7 @@ OUTPUT:
"spell": "5:10-5:16|5:3-7:4|1026|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [2743282246975181395],
"vars": [],
"alias_of": 0,
"kind": 23,
@ -95,16 +127,16 @@ OUTPUT:
}],
"usr2var": [{
"usr": 4731849186641714451,
"detailed_name": "static constexpr ns::VarType ns::Holder::static_var",
"qual_name_offset": 29,
"detailed_name": "static constexpr VarType ns::Holder::static_var",
"qual_name_offset": 25,
"short_name": "static_var",
"hover": "static constexpr ns::VarType ns::Holder::static_var = (VarType)0x0",
"spell": "10:37-10:47|9:3-10:47|1026|-1",
"hover": "static constexpr VarType ns::Holder::static_var = (VarType)0x0",
"spell": "6:30-6:40|6:5-6:55|1026|-1",
"type": 1532099849728741556,
"kind": 13,
"kind": 8,
"parent_kind": 23,
"storage": 2,
"declarations": ["6:30-6:40|6:5-6:55|1025|-1"],
"declarations": ["10:37-10:47|9:3-10:47|1025|-1"],
"uses": ["13:26-13:36|12|-1", "14:27-14:37|12|-1"]
}, {
"usr": 9008550860229740818,
@ -113,7 +145,7 @@ OUTPUT:
"short_name": "Foo2",
"hover": "int ns::Foo2 = Holder<int>::static_var",
"spell": "14:7-14:11|14:3-14:37|1026|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 3,
"storage": 0,
@ -126,7 +158,7 @@ OUTPUT:
"short_name": "Foo",
"hover": "int ns::Foo = Holder<int>::static_var",
"spell": "13:7-13:10|13:3-13:36|1026|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 3,
"storage": 0,

View File

@ -35,7 +35,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -63,14 +63,14 @@ OUTPUT:
"spell": "2:8-2:9|2:1-5:2|2|-1",
"bases": [],
"funcs": [8905286151237717330],
"types": [],
"types": [14750650276757822712],
"vars": [{
"L": 5866801090710377175,
"R": -1
}],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -79,18 +79,33 @@ OUTPUT:
"usr": 14750650276757822712,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "T",
"spell": "1:17-1:18|1:11-1:18|2|-1",
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 5,
"declarations": [],
"parent_kind": 0,
"declarations": ["1:17-1:18|1:11-1:18|1025|-1"],
"derived": [],
"instances": [5866801090710377175],
"uses": ["3:3-3:4|4|-1"]
}, {
"usr": 14756043565860085104,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["7:17-7:18|7:11-7:18|1|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{

View File

@ -33,7 +33,7 @@ OUTPUT:
"uses": ["10:21-10:24|36|-1", "11:22-11:25|36|-1"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -48,6 +48,22 @@ OUTPUT:
"derived": [],
"instances": [15768138241775955040, 3182917058194750998],
"uses": []
}, {
"usr": 404962309137154484,
"detailed_name": "R",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["4:23-4:24|4:14-4:24|1|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 11072669167287398027,
"detailed_name": "namespace ns {}",
@ -70,6 +86,22 @@ OUTPUT:
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 14005287469305211602,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["2:21-2:22|2:12-2:22|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 14042997404480181958,
"detailed_name": "struct ns::Foo {}",
@ -78,7 +110,7 @@ OUTPUT:
"spell": "3:10-3:13|3:3-8:4|1026|-1",
"bases": [],
"funcs": [8221803074608342407],
"types": [],
"types": [14005287469305211602],
"vars": [],
"alias_of": 0,
"kind": 23,
@ -95,7 +127,7 @@ OUTPUT:
"short_name": "b",
"hover": "int ns::b = Foo<bool>::foo<double>()",
"spell": "11:7-11:8|11:3-11:35|1026|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 3,
"storage": 0,
@ -108,7 +140,7 @@ OUTPUT:
"short_name": "a",
"hover": "int ns::a = Foo<int>::foo<float>()",
"spell": "10:7-10:8|10:3-10:33|1026|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 3,
"storage": 0,

View File

@ -42,7 +42,7 @@ OUTPUT:
"spell": "3:9-3:12|3:3-3:15|1026|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [17234941064111183681],
"vars": [],
"alias_of": 0,
"kind": 5,
@ -51,6 +51,22 @@ OUTPUT:
"derived": [],
"instances": [15768138241775955040, 3182917058194750998],
"uses": ["5:3-5:6|4|-1", "6:3-6:6|4|-1"]
}, {
"usr": 17234941064111183681,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["2:21-2:22|2:12-2:22|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 3182917058194750998,

View File

@ -53,7 +53,7 @@ OUTPUT:
"qual_name_offset": 16,
"short_name": "foo",
"bases": [],
"vars": [],
"vars": [12904523933304867124],
"callees": [],
"kind": 12,
"parent_kind": 0,
@ -63,7 +63,7 @@ OUTPUT:
"uses": []
}, {
"usr": 6113470698424012876,
"detailed_name": "void vector<Z2, allocator<Z2> >::clear()",
"detailed_name": "void vector<Z2>::clear()",
"qual_name_offset": 5,
"short_name": "clear",
"bases": [],
@ -82,10 +82,10 @@ OUTPUT:
"short_name": "foo",
"spell": "39:6-39:9|39:1-39:21|2|-1",
"bases": [],
"vars": [17826688417349629938],
"vars": [9217877221147056536, 3621126593459656452, 17826688417349629938],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -106,7 +106,7 @@ OUTPUT:
"uses": []
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -119,11 +119,27 @@ OUTPUT:
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [13914496963221806870],
"instances": [9217877221147056536, 3621126593459656452, 13914496963221806870],
"uses": []
}, {
"usr": 481,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [12904523933304867124],
"uses": []
}, {
"usr": 218068462278884837,
"detailed_name": "template <typename T, typename ...Args> class function<type-parameter-0-0 (type-parameter-0-1...)> {}",
"detailed_name": "template <typename T, typename ...Args> class function<T (Args...)> {}",
"qual_name_offset": 46,
"short_name": "function",
"spell": "5:7-5:15|4:1-5:30|2|-1",
@ -133,14 +149,14 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [2933643612409209903],
"uses": ["7:1-7:9|4|-1"]
}, {
"usr": 1663022413889915338,
"detailed_name": "template<> class vector<Z2, allocator<Z2>> {}",
"detailed_name": "template<> class vector<Z2> {}",
"qual_name_offset": 17,
"short_name": "vector",
"spell": "26:7-26:13|25:1-28:2|2|-1",
@ -150,11 +166,11 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [15931696253641284761],
"uses": ["26:7-26:13|4|-1", "33:1-33:7|4|-1"]
"uses": ["33:1-33:7|4|-1"]
}, {
"usr": 5760043510674081814,
"detailed_name": "struct Z1 {}",
@ -167,11 +183,43 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["21:23-21:25|4|-1", "32:8-32:10|4|-1"]
}, {
"usr": 6953303017847795730,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["11:19-11:20|11:10-11:20|1025|-1"],
"derived": [],
"instances": [],
"uses": ["11:49-11:50|4|-1"]
}, {
"usr": 7143192229126273961,
"detailed_name": "Args",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["5:18-5:22|4|-1"]
}, {
"usr": 7440942986741176606,
"detailed_name": "class vector {}",
@ -180,15 +228,31 @@ OUTPUT:
"spell": "12:7-12:13|12:1-14:2|2|-1",
"bases": [],
"funcs": [18107614608385228556],
"types": [],
"types": [6953303017847795730, 9777924294257602255],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [16155717907537731864, 1663022413889915338],
"instances": [5792869548777559988],
"uses": ["17:7-17:13|4|-1", "21:16-21:22|4|-1", "30:1-30:7|4|-1", "32:1-32:7|4|-1"]
"instances": [5792869548777559988, 3566687051827176322],
"uses": ["30:1-30:7|4|-1", "32:1-32:7|4|-1"]
}, {
"usr": 8880262253425334092,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["17:14-17:15|4|-1"]
}, {
"usr": 9201299975592934124,
"detailed_name": "enum Enum {}",
@ -201,10 +265,42 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["38:30-38:34|4|-1"]
}, {
"usr": 9673599782548740467,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["5:16-5:17|4|-1"]
}, {
"usr": 9777924294257602255,
"detailed_name": "Alloc",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["11:31-11:36|11:22-11:51|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 10124869160135436852,
@ -218,7 +314,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -227,19 +323,18 @@ OUTPUT:
"usr": 14111105212951082474,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "T",
"spell": "38:20-38:21|38:11-38:21|2|-1",
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 5,
"declarations": [],
"parent_kind": 0,
"declarations": ["38:20-38:21|38:11-38:21|1|-1"],
"derived": [],
"instances": [17826688417349629938],
"uses": []
"uses": ["39:10-39:11|4|-1"]
}, {
"usr": 15019211479263750068,
"detailed_name": "class function",
@ -247,7 +342,7 @@ OUTPUT:
"short_name": "function",
"bases": [],
"funcs": [],
"types": [],
"types": [18140454020659517869],
"vars": [],
"alias_of": 0,
"kind": 5,
@ -255,22 +350,6 @@ OUTPUT:
"declarations": ["2:7-2:15|2:1-2:15|1|-1"],
"derived": [218068462278884837],
"instances": [],
"uses": ["5:7-5:15|4|-1"]
}, {
"usr": 15440970074034693939,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [3566687051827176322],
"uses": []
}, {
"usr": 15695704394170757108,
@ -279,7 +358,7 @@ OUTPUT:
"short_name": "allocator",
"bases": [],
"funcs": [],
"types": [],
"types": [17690566930043896921],
"vars": [],
"alias_of": 0,
"kind": 5,
@ -290,7 +369,7 @@ OUTPUT:
"uses": ["11:39-11:48|4|-1"]
}, {
"usr": 16155717907537731864,
"detailed_name": "template <typename T> class vector<type-parameter-0-0 *, allocator<type-parameter-0-0 *>> {}",
"detailed_name": "template <typename T> class vector<T *> {}",
"qual_name_offset": 28,
"short_name": "vector",
"spell": "17:7-17:13|16:1-17:20|2|-1",
@ -300,11 +379,43 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [86949563628772958],
"uses": ["31:1-31:7|4|-1"]
}, {
"usr": 17690566930043896921,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["9:19-9:20|9:10-9:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 18140454020659517869,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:16-1:17|1:10-1:17|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 86949563628772958,
@ -314,7 +425,7 @@ OUTPUT:
"spell": "31:14-31:17|31:1-31:17|2|-1",
"type": 16155717907537731864,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -326,7 +437,7 @@ OUTPUT:
"spell": "7:21-7:22|7:1-7:22|2|-1",
"type": 218068462278884837,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -336,12 +447,23 @@ OUTPUT:
"qual_name_offset": 11,
"short_name": "vz1",
"spell": "32:12-32:15|32:1-32:15|2|-1",
"type": 15440970074034693939,
"type": 7440942986741176606,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 3621126593459656452,
"detailed_name": "int E",
"qual_name_offset": 4,
"short_name": "E",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": ["38:40-38:41|38:36-38:41|1025|-1"],
"uses": []
}, {
"usr": 4917621020431490070,
"detailed_name": "Enum1",
@ -351,7 +473,7 @@ OUTPUT:
"spell": "36:10-36:15|36:10-36:15|1026|-1",
"type": 9201299975592934124,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -363,7 +485,30 @@ OUTPUT:
"spell": "30:14-30:16|30:1-30:16|2|-1",
"type": 7440942986741176606,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 9217877221147056536,
"detailed_name": "int I",
"qual_name_offset": 4,
"short_name": "I",
"type": 452,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": ["38:27-38:28|38:23-38:28|1025|-1"],
"uses": []
}, {
"usr": 12904523933304867124,
"detailed_name": "float Value",
"qual_name_offset": 6,
"short_name": "Value",
"spell": "43:44-43:49|43:38-43:49|1026|-1",
"type": 481,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
@ -374,9 +519,9 @@ OUTPUT:
"short_name": "kOnst",
"hover": "static const int kOnst = 7",
"spell": "41:18-41:23|41:1-41:27|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 2,
"declarations": [],
"uses": ["43:27-43:32|12|-1"]
@ -389,7 +534,7 @@ OUTPUT:
"spell": "36:3-36:8|36:3-36:8|1026|-1",
"type": 9201299975592934124,
"kind": 22,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": ["43:20-43:25|4|-1"]
@ -401,7 +546,7 @@ OUTPUT:
"spell": "33:12-33:15|33:1-33:15|2|-1",
"type": 1663022413889915338,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -9,7 +9,6 @@ void Template<T>::Foo() {}
template<>
void Template<void>::Foo() {}
/*
// TODO: usage information on Template is bad.
// TODO: Foo() should have multiple definitions.
@ -54,6 +53,38 @@ OUTPUT:
"uses": []
}],
"usr2type": [{
"usr": 4889840470949104569,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:16-1:17|1:10-1:17|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 13161199857701142428,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["7:15-7:16|4|-1"]
}, {
"usr": 17107291254533526269,
"detailed_name": "class Template {}",
"qual_name_offset": 6,
@ -61,11 +92,11 @@ OUTPUT:
"spell": "2:7-2:15|2:1-4:2|2|-1",
"bases": [],
"funcs": [11994188353303124840],
"types": [],
"types": [4889840470949104569],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -30,7 +30,7 @@ OUTPUT:
"uses": ["8:19-8:22|36|-1", "9:20-9:23|36|-1"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -53,15 +53,31 @@ OUTPUT:
"spell": "2:8-2:11|2:1-6:2|2|-1",
"bases": [],
"funcs": [8340731781048851399],
"types": [],
"types": [14929630827782508810],
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["8:9-8:12|4|-1", "9:9-9:12|4|-1"]
}, {
"usr": 14929630827782508810,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 12028309045033782423,
@ -70,9 +86,9 @@ OUTPUT:
"short_name": "b",
"hover": "int b = Foo<bool>::foo()",
"spell": "9:5-9:6|9:1-9:25|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -83,9 +99,9 @@ OUTPUT:
"short_name": "a",
"hover": "int a = Foo<int>::foo()",
"spell": "8:5-8:6|8:1-8:24|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -31,7 +31,7 @@ OUTPUT:
"uses": ["9:19-9:22|36|-1", "10:20-10:23|36|-1"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -46,6 +46,22 @@ OUTPUT:
"derived": [],
"instances": [16721564935990383768, 12028309045033782423],
"uses": []
}, {
"usr": 10424609343859267126,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 10528472276654770367,
"detailed_name": "struct Foo {}",
@ -54,15 +70,31 @@ OUTPUT:
"spell": "2:8-2:11|2:1-7:2|2|-1",
"bases": [],
"funcs": [9034026360701857235],
"types": [],
"types": [10424609343859267126],
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["9:9-9:12|4|-1", "10:9-10:12|4|-1"]
}, {
"usr": 12336546102385362252,
"detailed_name": "R",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["3:21-3:22|3:12-3:22|1|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 12028309045033782423,
@ -71,9 +103,9 @@ OUTPUT:
"short_name": "b",
"hover": "int b = Foo<bool>::foo<double>()",
"spell": "10:5-10:6|10:1-10:33|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -84,9 +116,9 @@ OUTPUT:
"short_name": "a",
"hover": "int a = Foo<int>::foo<float>()",
"spell": "9:5-9:6|9:1-9:31|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -31,7 +31,7 @@ VarDecl b
OUTPUT:
{
"includes": [],
"skipped_ranges": ["12:1-29:1"],
"skipped_ranges": ["12:1-28:7"],
"usr2func": [],
"usr2type": [{
"usr": 6697181287623958829,
@ -45,7 +45,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -58,11 +58,11 @@ OUTPUT:
"spell": "5:8-5:11|5:1-7:2|2|-1",
"bases": [],
"funcs": [],
"types": [13938528237873543349],
"types": [15010559816125069973, 13938528237873543349],
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -79,7 +79,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -101,6 +101,22 @@ OUTPUT:
"derived": [],
"instances": [16721564935990383768, 12028309045033782423],
"uses": ["9:9-9:14|4|-1", "10:9-10:14|4|-1"]
}, {
"usr": 15010559816125069973,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["4:19-4:20|4:10-4:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 12028309045033782423,
@ -110,7 +126,7 @@ OUTPUT:
"spell": "10:15-10:16|10:1-10:16|2|-1",
"type": 13938528237873543349,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -122,7 +138,7 @@ OUTPUT:
"spell": "9:15-9:16|9:1-9:16|2|-1",
"type": 13938528237873543349,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -13,7 +13,7 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -28,6 +28,22 @@ OUTPUT:
"derived": [],
"instances": [13545144895171991916, 16721564935990383768, 12028309045033782423],
"uses": []
}, {
"usr": 8038341777080655976,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 10528472276654770367,
"detailed_name": "struct Foo {}",
@ -36,11 +52,11 @@ OUTPUT:
"spell": "2:8-2:11|2:1-4:2|2|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [8038341777080655976],
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -53,9 +69,9 @@ OUTPUT:
"short_name": "b",
"hover": "int b = Foo<bool>::var",
"spell": "7:5-7:6|7:1-7:23|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -65,11 +81,12 @@ OUTPUT:
"qual_name_offset": 21,
"short_name": "var",
"hover": "static constexpr int Foo::var = 3",
"type": 53,
"kind": 13,
"spell": "3:24-3:27|3:3-3:31|1026|-1",
"type": 452,
"kind": 8,
"parent_kind": 23,
"storage": 2,
"declarations": ["3:24-3:27|3:3-3:31|1025|-1"],
"declarations": [],
"uses": ["6:19-6:22|12|-1", "7:20-7:23|12|-1"]
}, {
"usr": 16721564935990383768,
@ -78,9 +95,9 @@ OUTPUT:
"short_name": "a",
"hover": "int a = Foo<int>::var",
"spell": "6:5-6:6|6:1-6:22|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -24,14 +24,14 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": ["6:9-6:12|36|-1", "7:9-7:12|36|-1"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -46,6 +46,22 @@ OUTPUT:
"derived": [],
"instances": [16721564935990383768, 12028309045033782423],
"uses": []
}, {
"usr": 17666708977284229997,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 12028309045033782423,
@ -54,9 +70,9 @@ OUTPUT:
"short_name": "b",
"hover": "int b = foo<bool>()",
"spell": "7:5-7:6|7:1-7:20|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -67,9 +83,9 @@ OUTPUT:
"short_name": "a",
"hover": "int a = foo<int>()",
"spell": "6:5-6:6|6:1-6:19|2|-1",
"type": 53,
"type": 452,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -11,6 +11,22 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [],
"usr2type": [{
"usr": 8047497394564431352,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 10528472276654770367,
"detailed_name": "class Foo {}",
"qual_name_offset": 6,
@ -18,11 +34,11 @@ OUTPUT:
"spell": "2:7-2:10|2:1-2:13|2|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [8047497394564431352],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [16721564935990383768, 12028309045033782423],
@ -36,7 +52,7 @@ OUTPUT:
"spell": "5:11-5:12|5:1-5:12|2|-1",
"type": 10528472276654770367,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -48,7 +64,7 @@ OUTPUT:
"spell": "4:10-4:11|4:1-4:11|2|-1",
"type": 10528472276654770367,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -34,7 +34,7 @@ EXTRA_FLAGS:
OUTPUT:
{
"includes": [],
"skipped_ranges": ["12:1-29:1"],
"skipped_ranges": ["12:1-28:7"],
"usr2func": [],
"usr2type": [{
"usr": 6697181287623958829,
@ -48,7 +48,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [16721564935990383768],
@ -57,19 +57,18 @@ OUTPUT:
"usr": 11919899838872947844,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "T",
"spell": "4:19-4:20|4:10-4:20|2|-1",
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 5,
"declarations": [],
"parent_kind": 0,
"declarations": ["4:19-4:20|4:10-4:20|1|-1"],
"derived": [],
"instances": [8096973118640070624],
"uses": []
"uses": ["5:1-5:2|4|-1", "5:9-5:10|4|-1"]
}, {
"usr": 13892793056005362145,
"detailed_name": "enum B {}",
@ -82,7 +81,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 10,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [12028309045033782423],
@ -97,7 +96,7 @@ OUTPUT:
"spell": "5:3-5:6|5:1-5:12|2|-1",
"type": 11919899838872947844,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": ["7:7-7:10|12|-1", "8:7-8:10|12|-1"]
@ -110,7 +109,7 @@ OUTPUT:
"spell": "8:3-8:4|8:1-8:13|2|-1",
"type": 13892793056005362145,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []
@ -123,7 +122,7 @@ OUTPUT:
"spell": "7:3-7:4|7:1-7:13|2|-1",
"type": 6697181287623958829,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": []

View File

@ -10,7 +10,7 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [],
"usr2type": [{
"usr": 82,
"usr": 481,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -75,7 +75,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -99,7 +99,7 @@ OUTPUT:
"qual_name_offset": 6,
"short_name": "x",
"spell": "2:18-2:19|2:12-2:19|1026|-1",
"type": 82,
"type": 481,
"kind": 8,
"parent_kind": 23,
"storage": 0,
@ -111,7 +111,7 @@ OUTPUT:
"qual_name_offset": 6,
"short_name": "y",
"spell": "2:21-2:22|2:12-2:22|1026|-1",
"type": 82,
"type": 481,
"kind": 8,
"parent_kind": 23,
"storage": 0,
@ -123,7 +123,7 @@ OUTPUT:
"qual_name_offset": 6,
"short_name": "z",
"spell": "2:24-2:25|2:12-2:25|1026|-1",
"type": 82,
"type": 481,
"kind": 8,
"parent_kind": 23,
"storage": 0,

View File

@ -33,7 +33,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 252,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -10,7 +10,7 @@ OUTPUT:
"skipped_ranges": [],
"usr2func": [],
"usr2type": [{
"usr": 37,
"usr": 436,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -26,7 +26,7 @@ OUTPUT:
"instances": [8804696910588009104],
"uses": []
}, {
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -59,7 +59,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -71,7 +71,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "b",
"spell": "3:8-3:9|3:3-3:9|1026|-1",
"type": 37,
"type": 436,
"kind": 8,
"parent_kind": 5,
"storage": 0,
@ -83,7 +83,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"spell": "2:7-2:8|2:3-2:8|1026|-1",
"type": 53,
"type": 452,
"kind": 8,
"parent_kind": 5,
"storage": 0,

View File

@ -26,14 +26,14 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": []
}],
"usr2type": [{
"usr": 37,
"usr": 436,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -49,7 +49,7 @@ OUTPUT:
"instances": [8804696910588009104],
"uses": []
}, {
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -82,7 +82,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [2933643612409209903],
@ -96,7 +96,7 @@ OUTPUT:
"spell": "6:5-6:6|6:1-6:6|2|-1",
"type": 8501689086387244262,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"uses": ["9:3-9:4|4|-1"]
@ -106,7 +106,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "b",
"spell": "3:8-3:9|3:3-3:13|1026|-1",
"type": 37,
"type": 436,
"kind": 8,
"parent_kind": 5,
"storage": 0,
@ -118,7 +118,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"spell": "2:7-2:8|2:3-2:12|1026|-1",
"type": 53,
"type": 452,
"kind": 8,
"parent_kind": 5,
"storage": 0,

View File

@ -23,7 +23,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -56,7 +56,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -17,7 +17,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "called",
"bases": [],
"vars": [],
"vars": [821688872341099790, 6986353817767193884],
"callees": [],
"kind": 12,
"parent_kind": 0,
@ -35,14 +35,54 @@ OUTPUT:
"vars": [],
"callees": ["6:14-6:20|3787803219955606747|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": []
}],
"usr2type": [],
"usr2type": [{
"usr": 436,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [821688872341099790, 6986353817767193884],
"uses": []
}],
"usr2var": [{
"usr": 821688872341099790,
"detailed_name": "bool a",
"qual_name_offset": 5,
"short_name": "a",
"spell": "3:18-3:19|3:13-3:19|1026|-1",
"type": 436,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 6986353817767193884,
"detailed_name": "bool b",
"qual_name_offset": 5,
"short_name": "b",
"spell": "3:26-3:27|3:21-3:27|1026|-1",
"type": 436,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 16326993795872073150,
"detailed_name": "MACRO_CALL",
"qual_name_offset": 0,

View File

@ -54,7 +54,7 @@ OUTPUT:
"vars": [],
"callees": ["9:3-9:9|10177235824697315808|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -69,13 +69,29 @@ OUTPUT:
"vars": [],
"callees": ["5:3-5:9|468307235068920063|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": ["9:3-9:9|16420|-1"]
}],
"usr2type": [],
"usr2type": [{
"usr": 8908003062153072411,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["3:20-3:21|3:11-3:21|1|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": []
}
*/

View File

@ -23,7 +23,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -34,7 +34,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "Wrapper",
"bases": [],
"vars": [],
"vars": [17356425290273905453],
"callees": [],
"kind": 9,
"parent_kind": 0,
@ -52,13 +52,29 @@ OUTPUT:
"vars": [],
"callees": ["8:10-8:16|10544127002917214589|3|16676", "8:10-8:16|468307235068920063|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": []
}],
"usr2type": [{
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [17356425290273905453],
"uses": []
}, {
"usr": 13611487872560323389,
"detailed_name": "struct Wrapper {}",
"qual_name_offset": 7,
@ -70,12 +86,24 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["2:3-2:10|4|-1", "7:1-7:8|4|-1"]
}],
"usr2var": []
"usr2var": [{
"usr": 17356425290273905453,
"detailed_name": "int i",
"qual_name_offset": 4,
"short_name": "i",
"spell": "2:15-2:16|2:11-2:16|1026|-1",
"type": 452,
"kind": 253,
"parent_kind": 9,
"storage": 0,
"declarations": [],
"uses": []
}]
}
*/

View File

@ -22,7 +22,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -35,9 +35,8 @@ OUTPUT:
"spell": "5:6-5:10|5:1-8:2|2|-1",
"bases": [],
"vars": [16088407831770615719],
"callees": ["6:18-6:22|5264867802674151787|3|132", "6:18-6:22|5264867802674151787|3|132", "7:3-7:10|12924914488846929470|3|16420", "7:12-7:16|5264867802674151787|3|132"],
"kind": 12,
"parent_kind": 0,
"callees": ["6:18-6:22|5264867802674151787|3|132", "6:18-6:22|5264867802674151787|3|132",
"7:3-7:10|12924914488846929470|3|16420", "7:12-7:16|5264867802674151787|3|132"], "kind": 12, "parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -52,7 +51,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],

View File

@ -6,7 +6,6 @@ void user() {
auto x = &Foo::Used;
}
/*
OUTPUT:
{
@ -22,7 +21,7 @@ OUTPUT:
"vars": [4636142131003982569],
"callees": ["6:18-6:22|18417145003926999463|3|132", "6:18-6:22|18417145003926999463|3|132"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -54,7 +53,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -18,7 +18,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -33,7 +33,7 @@ OUTPUT:
"vars": [],
"callees": ["3:3-3:9|468307235068920063|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],

View File

@ -22,7 +22,7 @@ OUTPUT:
"vars": [14045150712868309451],
"callees": ["7:6-7:10|18417145003926999463|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -54,7 +54,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [14045150712868309451],

View File

@ -21,14 +21,14 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": ["6:11-6:17|36|-1"]
}],
"usr2type": [{
"usr": 53,
"usr": 452,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
@ -58,7 +58,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -71,7 +71,7 @@ OUTPUT:
"short_name": "x",
"hover": "int Foo::x = helper()",
"spell": "6:7-6:8|6:3-6:19|1026|-1",
"type": 53,
"type": 452,
"kind": 8,
"parent_kind": 5,
"storage": 0,

View File

@ -32,7 +32,7 @@ OUTPUT:
"vars": [],
"callees": ["4:3-4:6|4259594751088586730|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],

View File

@ -21,7 +21,7 @@ OUTPUT:
"vars": [16229832321010999607],
"callees": ["7:6-7:9|17922201480358737771|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -53,7 +53,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [16229832321010999607],

View File

@ -21,7 +21,7 @@ OUTPUT:
"vars": [],
"callees": ["5:3-5:9|10585861037135727329|3|16420", "6:3-6:9|10585861037135727329|3|16420"],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -41,7 +41,23 @@ OUTPUT:
"derived": [],
"uses": ["5:3-5:9|16420|-1", "6:3-6:9|16420|-1"]
}],
"usr2type": [],
"usr2type": [{
"usr": 13420564603121289209,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1|-1"],
"derived": [],
"instances": [],
"uses": ["2:13-2:14|4|-1"]
}],
"usr2var": []
}
*/

View File

@ -25,7 +25,7 @@ OUTPUT:
"vars": [3364438781074774169],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -39,15 +39,31 @@ OUTPUT:
"spell": "2:7-2:17|2:1-2:20|2|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [3365245325694180663],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [12857919739649552168, 18075066956054788088, 3364438781074774169],
"uses": ["6:8-6:18|4|-1", "7:8-7:18|4|-1", "9:1-9:11|4|-1", "10:3-10:13|4|-1"]
}, {
"usr": 3365245325694180663,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 4750332761459066907,
"detailed_name": "struct S {}",
@ -60,7 +76,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],
@ -86,7 +102,7 @@ OUTPUT:
"spell": "6:25-6:27|6:1-6:27|2|-1",
"type": 3286534761799572592,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 2,
"declarations": [],
"uses": []
@ -98,7 +114,7 @@ OUTPUT:
"spell": "7:22-7:24|7:1-7:24|2|-1",
"type": 3286534761799572592,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 2,
"declarations": [],
"uses": []

View File

@ -82,7 +82,7 @@ unique_ptr<S1, S2>* Foo::foo() { return nullptr; }
OUTPUT:
{
"includes": [],
"skipped_ranges": ["7:1-15:1", "17:1-33:1", "35:1-40:1", "42:1-53:1", "57:1-64:1", "68:1-79:1"],
"skipped_ranges": ["7:1-14:7", "17:1-32:7", "35:1-39:7", "42:1-52:7", "57:1-63:7", "68:1-78:7"],
"usr2func": [{
"usr": 1246637699196435450,
"detailed_name": "unique_ptr<unique_ptr<S1, S2>, S2> *as_return_type(unique_ptr<S1, S2> *)",
@ -93,7 +93,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -108,7 +108,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -138,13 +138,29 @@ OUTPUT:
"vars": [500112618220246],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
"uses": []
}],
"usr2type": [{
"usr": 875011242051264538,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 4310164820010458371,
"detailed_name": "struct S1",
"qual_name_offset": 7,
@ -159,7 +175,24 @@ OUTPUT:
"declarations": ["4:8-4:10|4:1-4:10|1|-1"],
"derived": [],
"instances": [],
"uses": ["15:30-15:32|4|-1", "33:23-33:25|4|-1", "33:63-33:65|4|-1", "54:25-54:27|4|-1", "65:14-65:16|4|-1", "79:12-79:14|4|-1"]
"uses": ["15:30-15:32|4|-1", "33:23-33:25|4|-1", "33:63-33:65|4|-1", "54:25-54:27|4|-1", "65:14-65:16|4|-1",
"79:12-79:14|4|-1"]
}, {
"usr": 10605525886521205308,
"detailed_name": "B",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:31-1:32|1:22-1:32|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}, {
"usr": 12728490517004312484,
"detailed_name": "struct S2",
@ -175,7 +208,8 @@ OUTPUT:
"declarations": ["5:8-5:10|5:1-5:10|1|-1"],
"derived": [],
"instances": [],
"uses": ["15:34-15:36|4|-1", "15:39-15:41|4|-1", "33:27-33:29|4|-1", "33:32-33:34|4|-1", "33:67-33:69|4|-1", "54:29-54:31|4|-1", "54:34-54:36|4|-1", "65:18-65:20|4|-1", "79:16-79:18|4|-1"]
"uses": ["15:34-15:36|4|-1", "15:39-15:41|4|-1", "33:27-33:29|4|-1", "33:32-33:34|4|-1", "33:67-33:69|4|-1",
"54:29-54:31|4|-1", "54:34-54:36|4|-1", "65:18-65:20|4|-1", "79:16-79:18|4|-1"]
}, {
"usr": 14209198335088845323,
"detailed_name": "class unique_ptr",
@ -183,7 +217,7 @@ OUTPUT:
"short_name": "unique_ptr",
"bases": [],
"funcs": [],
"types": [],
"types": [875011242051264538, 10605525886521205308],
"vars": [],
"alias_of": 0,
"kind": 5,
@ -191,7 +225,8 @@ OUTPUT:
"declarations": ["2:7-2:17|2:1-2:17|1|-1"],
"derived": [],
"instances": [2933643612409209903, 500112618220246],
"uses": ["15:8-15:18|4|-1", "15:19-15:29|4|-1", "33:1-33:11|4|-1", "33:12-33:22|4|-1", "33:52-33:62|4|-1", "54:3-54:13|4|-1", "54:14-54:24|4|-1", "65:3-65:13|4|-1", "79:1-79:11|4|-1"]
"uses": ["15:8-15:18|4|-1", "15:19-15:29|4|-1", "33:1-33:11|4|-1", "33:12-33:22|4|-1", "33:52-33:62|4|-1",
"54:3-54:13|4|-1", "54:14-54:24|4|-1", "65:3-65:13|4|-1", "79:1-79:11|4|-1"]
}, {
"usr": 15041163540773201510,
"detailed_name": "class Foo {}",
@ -204,7 +239,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -19,11 +19,11 @@ OUTPUT:
"spell": "2:7-2:17|2:1-2:20|2|-1",
"bases": [],
"funcs": [],
"types": [],
"types": [11508089533865125841],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [3398408600781120939],
@ -44,6 +44,22 @@ OUTPUT:
"derived": [],
"instances": [],
"uses": ["6:19-6:20|4|-1"]
}, {
"usr": 11508089533865125841,
"detailed_name": "T",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 26,
"parent_kind": 0,
"declarations": ["1:19-1:20|1:10-1:20|1025|-1"],
"derived": [],
"instances": [],
"uses": []
}],
"usr2var": [{
"usr": 3398408600781120939,
@ -53,7 +69,7 @@ OUTPUT:
"spell": "6:22-6:25|6:1-6:25|2|-1",
"type": 3286534761799572592,
"kind": 13,
"parent_kind": 0,
"parent_kind": 1,
"storage": 2,
"declarations": [],
"uses": []

View File

@ -19,7 +19,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [1346710425945444872],

View File

@ -24,7 +24,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [14727441168849658842],
@ -63,7 +63,7 @@ OUTPUT:
}],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [],

View File

@ -21,7 +21,7 @@ OUTPUT:
"vars": [16374832544037266261, 2580122838476012357],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -39,7 +39,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [2580122838476012357],

View File

@ -18,7 +18,7 @@ OUTPUT:
"vars": [13058491096576226774, 11055777568039014776],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],
@ -36,7 +36,7 @@ OUTPUT:
"vars": [],
"alias_of": 0,
"kind": 23,
"parent_kind": 0,
"parent_kind": 1,
"declarations": [],
"derived": [],
"instances": [11055777568039014776],

View File

@ -20,10 +20,10 @@ OUTPUT:
"short_name": "foo",
"spell": "4:6-4:9|4:1-4:26|2|-1",
"bases": [],
"vars": [13823260660189154978],
"vars": [9791335934911072644, 13823260660189154978],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": ["3:6-3:9|3:1-3:23|1|-1"],
"derived": [],
@ -43,10 +43,22 @@ OUTPUT:
"parent_kind": 0,
"declarations": ["1:8-1:11|1:1-1:11|1|-1"],
"derived": [],
"instances": [13823260660189154978],
"instances": [9791335934911072644, 13823260660189154978],
"uses": ["3:10-3:13|4|-1", "3:18-3:21|4|-1", "4:10-4:13|4|-1", "4:18-4:21|4|-1"]
}],
"usr2var": [{
"usr": 9791335934911072644,
"detailed_name": "Foo *f",
"qual_name_offset": 5,
"short_name": "f",
"spell": "3:15-3:16|3:10-3:16|1026|-1",
"type": 15041163540773201510,
"kind": 253,
"parent_kind": 12,
"storage": 0,
"declarations": [],
"uses": []
}, {
"usr": 13823260660189154978,
"detailed_name": "Foo *f",
"qual_name_offset": 5,

View File

@ -15,7 +15,7 @@ OUTPUT:
"vars": [],
"callees": [],
"kind": 12,
"parent_kind": 0,
"parent_kind": 1,
"storage": 0,
"declarations": [],
"derived": [],

Some files were not shown because too many files have changed in this diff Show More