[PATCH] D139107: [clangd] Allow to build Clangd without decision forest
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 5 04:03:22 PST 2022
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Looks great, thanks!
================
Comment at: clang-tools-extra/clangd/CMakeLists.txt:21
+option(CLANGD_DECISION_FOREST "Enable decision forest model for ranking code completion items" ON)
option(CLANGD_MALLOC_TRIM "Call malloc_trim(3) periodically in Clangd. (only takes effect when using glibc)" ON)
----------------
May want to add a motivating comment like "this involves generating and compiling large source files, which can run into toolchain limitations"?
(This does violate the convention that build configurations should be as mysterious as possible!)
================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:26
#include "FileDistance.h"
#include "FuzzyMatch.h"
#include "Headers.h"
----------------
Include feature.h instead of relying on it transitively?
(Important here as losing the include changes the behavior)
================
Comment at: clang-tools-extra/clangd/CodeComplete.h:134
+ };
+ static const CodeCompletionRankingModel DefaultRankingModel;
+ CodeCompletionRankingModel RankingModel = DefaultRankingModel;
----------------
Nice, somehow i forgot this was an option
================
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:14
#include "Compiler.h"
#include "Matchers.h"
#include "Protocol.h"
----------------
Feature.h here too
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139107/new/
https://reviews.llvm.org/D139107
More information about the cfe-commits
mailing list