[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-24 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGaaa8b44d1991: [clangd] Add a TestWorkspace utility (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-24 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 300513. nridge marked 4 inline comments as done. nridge added a comment. address final review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89297/new/ https://reviews.llvm.org/D89297 Files: clang-too

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Comment at: clang-tools-extra/clangd/unittests/TestWorkspace.cpp:17 + for (const auto &Input : Inputs) { +if (!Input.second.IsMainFile) { + contin

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-20 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 299526. nridge marked 8 inline comments as done. nridge added a comment. Herald added subscribers: llvm-commits, mgorny. Herald added a project: LLVM. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks this mostly looks good. can you move implementations from TestWorkspace.h to TestWorkspace.cpp ? Comment at: clang-tools-extra/clangd/unittests/FileIndexTests.cpp:431 +TEST(FileIndexTest, RelationsMultiFile) { + TestWorkspace Workspace({{"Base

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a reviewer: kadircet. nridge added a comment. Thanks for the suggestions! I implemented them and it seems to be working well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89297/new/ https://reviews.llvm.org/D89297 ___

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 298926. nridge added a comment. Rework utility as suggested Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89297/new/ https://reviews.llvm.org/D89297 Files: clang-tools-extra/clangd/unittests/BackgroundIndexTe

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. This looks like a useful infra to have indeed, we currently don't have an easy way to setup a testcase that would require interactions between multiple files (e.g. a workspace), as you've noticed while working on callhierarchy tests (sorry for that). A couple of sugge

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-15 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D89297#2326838 , @nridge wrote: > In principle, it should be possible to make the same interface work with > `FileIndex` under the hood, but I haven't figured out how. (Specifically, I > haven't figured out how to get `FileInde

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. This patch is a spinoff from my call hierarchy work (which I haven't posted for review yet, though I posted a draft at D89296 ). I'd like to be able to write tests where I can: - specify the contents of multiple header and source files,

[PATCH] D89297: [clangd] Add a TestWorkspace utility

2020-10-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. nridge requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Use it in BackgroundIndexTest.RelationsMultiFile Repository: rG LLVM Gi