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`
26 lines
233 B
C++
26 lines
233 B
C++
|
|
#ifdef FOOBAR
|
|
void hello();
|
|
#endif
|
|
|
|
#if false
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#if defined(OS_FOO)
|
|
|
|
#endif
|
|
|
|
/*
|
|
OUTPUT:
|
|
{
|
|
"includes": [],
|
|
"skipped_ranges": ["2:1-4:7", "6:1-10:7", "12:1-14:7"],
|
|
"usr2func": [],
|
|
"usr2type": [],
|
|
"usr2var": []
|
|
}
|
|
*/
|