ClangCodeModel: Make sure clangd sends all results

... for textDocument/references. The --limit-results option was recently
split up; we have to set --limit-references as well now.

Change-Id: I979aa21a11a08e829b6e843c0c135098aac7d3f5
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-11-01 12:17:37 +01:00
parent 4dfdbf91f6
commit bcebf65bb1

View File

@@ -566,7 +566,7 @@ static BaseClientInterface *clientInterface(Project *project, const Utils::FileP
const QString headerInsertionOption = QString("--header-insertion=")
+ (settings.autoIncludeHeaders() ? "iwyu" : "never");
Utils::CommandLine cmd{settings.clangdFilePath(), {indexingOption, headerInsertionOption,
"--limit-results=0", "--clang-tidy=0"}};
"--limit-results=0", "--limit-references=0", "--clang-tidy=0"}};
if (settings.workerThreadLimit() != 0)
cmd.addArg("-j=" + QString::number(settings.workerThreadLimit()));
if (!jsonDbDir.isEmpty())