mirror of
https://github.com/MaskRay/ccls.git
synced 2025-08-17 20:22:23 +00:00
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`
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
class Foo {
|
|
void foo();
|
|
};
|
|
|
|
/*
|
|
// NOTE: Lack of declaring_type in functions and funcs in Foo is okay, because
|
|
// those are processed when we find the definition for Foo::foo. Pure
|
|
// virtuals are treated specially and get added to the type immediately.
|
|
|
|
OUTPUT:
|
|
{
|
|
"includes": [],
|
|
"skipped_ranges": [],
|
|
"usr2func": [{
|
|
"usr": 17922201480358737771,
|
|
"detailed_name": "void Foo::foo()",
|
|
"qual_name_offset": 5,
|
|
"short_name": "foo",
|
|
"bases": [],
|
|
"vars": [],
|
|
"callees": [],
|
|
"kind": 6,
|
|
"parent_kind": 0,
|
|
"storage": 0,
|
|
"declarations": ["2:8-2:11|2:3-2:13|1025|-1"],
|
|
"derived": [],
|
|
"uses": []
|
|
}],
|
|
"usr2type": [{
|
|
"usr": 15041163540773201510,
|
|
"detailed_name": "class Foo {}",
|
|
"qual_name_offset": 6,
|
|
"short_name": "Foo",
|
|
"spell": "1:7-1:10|1:1-3:2|2|-1",
|
|
"bases": [],
|
|
"funcs": [17922201480358737771],
|
|
"types": [],
|
|
"vars": [],
|
|
"alias_of": 0,
|
|
"kind": 5,
|
|
"parent_kind": 1,
|
|
"declarations": [],
|
|
"derived": [],
|
|
"instances": [],
|
|
"uses": []
|
|
}],
|
|
"usr2var": []
|
|
}
|
|
*/
|