Make clangd CompletionModel not depend on directory layout.
authorHarald van Dijk <harald@gigawatt.nl>
Wed, 5 May 2021 18:25:34 +0000 (19:25 +0100)
committerHarald van Dijk <harald@gigawatt.nl>
Wed, 5 May 2021 18:25:34 +0000 (19:25 +0100)
commit7907c46fe6195728fafd843b8c0fb19a3e68e9ad
treeaeb21bf0b0d25cc6e8c24d5be19e813b174c6d08
parentaefbfbcbd776f5549b18cd6083d6408f661efacc
Make clangd CompletionModel not depend on directory layout.

The current code accounts for two possible layouts, but there is at
least a third supported layout: clang-tools-extra may also be checked
out as clang/tools/extra with the releases, which was not yet handled.
Rather than treating that as a special case, use the location of
CompletionModel.cmake to handle all three cases. This should address the
problems that prompted D96787 and the problems that prompted the
proposed revert D100625.

Reviewed By: usaxena95

Differential Revision: https://reviews.llvm.org/D101851
clang-tools-extra/clangd/quality/CompletionModel.cmake