Skip to content

ccls seems to get confused when trying to find libc++ when libc++ itself is being built #344

@lanza

Description

@lanza

I work on lldb and other llvm projects and my regular build includes libcxx. Thus libcxx ends up as just part of the built products of the compile_commands.json.

When I open some arbitrary llvm file that uses #include <memory>, for example, it complains that it can't find the file and then can't find the usages of std::unique_ptr. However, go-to definition on std::unique_ptr takes you to "src/llvm-project/libcxx/include/memory".

My setup is src/llvm-project/build/Debug/ as the build directory and then ln -s /path/to/src/llvm-project/build/Debug/compile_commands.json /path/to/src/llvm-project/llvm/. Then I CD to llvm-project/llvm and open neovim and open, e.g. include/llvm/DebugInfo/PDB/PDBSymbol.h and it can't find std::unique_ptr though go-to-def takes you to llvm-project/libcxx/include/memory.

If I switch to standalone builds and relink the compile_commands.json to the standalone one everything works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions