forked from qt-creator/qt-creator
ClangCodeModel: Do not try to rename macros and namespaces with clangd
Unfortunately, clangd refuses to rename macros and namespaces. Fall back to our old two-stage "find + replace" approach for macros (which clangd can find just fine) and employ the built-in code model for namespaces (as they don't get indexed at all by clangd). Change-Id: I08b1088ff4de9220427e089ef0700dbf2a944081 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -294,7 +294,7 @@ void ClangdTestFindReferences::test()
|
||||
QVERIFY(doc);
|
||||
QTextCursor cursor(doc->document());
|
||||
cursor.setPosition(pos);
|
||||
client()->findUsages(doc, cursor, {}, {});
|
||||
client()->findUsages(CppEditor::CursorInEditor(cursor, doc->filePath(), nullptr, doc), {}, {});
|
||||
QVERIFY(waitForSignalOrTimeout(client(), &ClangdClient::findUsagesDone, timeOutInMs()));
|
||||
|
||||
QCOMPARE(m_actualResults.size(), expectedResults.size());
|
||||
|
||||
Reference in New Issue
Block a user