Merge remote-tracking branch 'origin/8.0'

Change-Id: Iea4fd2949f5d5345802e2e7d9283d72c6c55f69f
This commit is contained in:
hjk
2022-08-03 10:52:13 +02:00
16 changed files with 180 additions and 65 deletions

View File

@@ -651,6 +651,14 @@ DiagnosticManager *ClangdClient::createDiagnosticManager()
return diagnosticManager;
}
bool ClangdClient::referencesShadowFile(const TextEditor::TextDocument *doc,
const Utils::FilePath &candidate)
{
const QRegularExpression includeRex("#include.*" + candidate.fileName() + R"([>"])");
const QTextCursor includePos = doc->document()->find(includeRex);
return !includePos.isNull();
}
RefactoringChangesData *ClangdClient::createRefactoringChangesBackend() const
{
return new CppEditor::CppRefactoringChangesData(