This is useful for multi-project setups where each project has its own
compilation database, and particularly in cases where such databases
are located outside of the respective source directories (for example,
in build directories).
Details
- Reviewers
ilya-biryukov
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
As background, some discussion of this took place on the mailing list a few months ago: http://lists.llvm.org/pipermail/clangd-dev/2019-January/000232.html
Could this be handled outside clangd? If not, what are the complications?
We currently have a capability to specify a path to a single compile_commands.json.
I would expect clients using this extension (Theia?) also handle generation of compile_commands.json. If that's the case, could they merge multiple compile_commands.json files into one and ask clangd to load it using APIs we have today?
Thanks for having a look! I filed an issue so some folks who don't necessarily have an LLVM Phabricator account can weigh in, let's continue the discussion there.
Ilya / others if interested, I would like to revive this patch.
We left off with a discussion in the corresponding issue, where I made a suggestion for an initial way forward. Could I get some feedback on that please?
Unit tests: fail. 62144 tests passed, 5 failed and 811 were skipped.
failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongord/strongord.pass.cpp failed: libc++.std/language_support/cmp/cmp_weakeq/cmp.weakeq.pass.cpp failed: libc++.std/language_support/cmp/cmp_weakord/weakord.pass.cpp
clang-tidy: fail. clang-tidy found 2 errors and 4 warnings. 4 of them are added as review comments below (why?).
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
clang-tidy: warning: invalid case style for member 'sourceDir' [readability-identifier-naming]
not useful