Skip to content

Commit f51ab18

Browse files
author
serge-sans-paille
committed
Make clangd CompletionModel usable even with non-standard (but supported) layout
llvm supports specifying a non-standard layout where each project lies in its own place. Do not assume a fixed layout and use the appropriate cmake variable instead. Differential Revision: https://reviews.llvm.org/D96787
1 parent b2f7ce9 commit f51ab18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang-tools-extra/clangd/quality/CompletionModel.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# will define a C++ class called ${cpp_class} - which may be a
66
# namespace-qualified class name.
77
function(gen_decision_forest model filename cpp_class)
8-
set(model_compiler ${CMAKE_SOURCE_DIR}/../clang-tools-extra/clangd/quality/CompletionModelCodegen.py)
9-
8+
set(model_compiler ${LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR}/clangd/quality/CompletionModelCodegen.py)
9+
1010
set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
1111
set(header_file ${output_dir}/${filename}.h)
1212
set(cpp_file ${output_dir}/${filename}.cpp)

0 commit comments

Comments
 (0)