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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/quality/CompletionModel.cmake | ||
---|---|---|
7 | nit: Directly refer to code generator instead of storing quality dir. |
clang-tools-extra/clangd/quality/CompletionModel.cmake | ||
---|---|---|
7 | Alright, done. Testing in progress just to be on the safe side. We could also get rid of model_compiler and use ${CLANGD_COMPLETION_MODEL_COMPILER} directly, but I felt that looked bad due to the conflicting variable naming styles and the long lines, so I left that. |
clang-tools-extra/clangd/quality/CompletionModel.cmake | ||
---|---|---|
9 | We can remove this variable as well and use the above var at all places. |
nit: Directly refer to code generator instead of storing quality dir.
set(CLANGD_COMPLETION_MODEL_COMPILER ${CMAKE_CURRENT_LIST_DIR}/CompletionModelCodegen.py)