Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions clang-tools-extra/clangd/tool/ClangdMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ class FlagsConfigProvider : public config::Provider {
std::optional<Config::ExternalIndexSpec> IndexSpec;
std::optional<Config::BackgroundPolicy> BGPolicy;
std::optional<Config::ArgumentListsPolicy> ArgumentLists;
std::optional<Config::HeaderInsertionPolicy> HeaderInsertionPolicy;

// If --compile-commands-dir arg was invoked, check value and override
// default path.
Expand Down Expand Up @@ -713,11 +712,6 @@ class FlagsConfigProvider : public config::Provider {
BGPolicy = Config::BackgroundPolicy::Skip;
}

// If CLI has set never, use that regardless of what the config files have
if (HeaderInsertion == Config::HeaderInsertionPolicy::NeverInsert) {
HeaderInsertionPolicy = Config::HeaderInsertionPolicy::NeverInsert;
}

if (std::optional<bool> Enable = shouldEnableFunctionArgSnippets()) {
ArgumentLists = *Enable ? Config::ArgumentListsPolicy::FullPlaceholders
: Config::ArgumentListsPolicy::Delimiters;
Expand All @@ -732,8 +726,8 @@ class FlagsConfigProvider : public config::Provider {
C.Index.Background = *BGPolicy;
if (ArgumentLists)
C.Completion.ArgumentLists = *ArgumentLists;
if (HeaderInsertionPolicy)
C.Completion.HeaderInsertion = *HeaderInsertionPolicy;
if (HeaderInsertion.getNumOccurrences())
C.Completion.HeaderInsertion = HeaderInsertion;
if (AllScopesCompletion.getNumOccurrences())
C.Completion.AllScopes = AllScopesCompletion;

Expand Down
Loading