ClangCodeModel: Adapt clangd test to upstream change

See https://reviews.llvm.org/D110324.

Change-Id: I9dbc03dd814392939be28d1943515d581f9f5b58
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-09-23 17:04:33 +02:00
parent f8c2ab9f7a
commit b10641caa2
2 changed files with 6 additions and 5 deletions

View File

@@ -1119,7 +1119,7 @@ void ClangdClient::Private::handleFindUsagesResult(quint64 key, const QList<Loca
finishSearch(*refData, true);
});
for (const Location &loc : locations) // TODO: Can contain duplicates. Rather fix in clang than work around it here.
for (const Location &loc : locations)
refData->fileData[loc.uri()].rangesAndLineText << qMakePair(loc.range(), QString()); // TODO: Can we assume that locations for the same file are grouped?
for (auto it = refData->fileData.begin(); it != refData->fileData.end(); ++it) {
const QStringList lines = SymbolSupport::getFileContents(it.key().toFilePath());