Clang: implement globalRename based on clang Index

Has the same limitations as findUsages.

Change-Id: I8de4df2ecbfd8a4f3073666994398dc43af0d73c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2017-09-25 10:51:39 +02:00
parent 3bea291427
commit 81f5c1c8ec
11 changed files with 62 additions and 48 deletions

View File

@@ -115,6 +115,16 @@ TEST_F(RefactoringEngine, ExpectLocationsAtInFindUsages)
[](const CppTools::Usages &) {});
}
TEST_F(RefactoringEngine, ExpectLocationsAtInGlobalRename)
{
cursor.setPosition(11);
EXPECT_CALL(mockSymbolQuery, locationsAt(_, 2, 5));
engine.globalRename(CppTools::CursorInEditor{cursor, filePath},
[](const CppTools::Usages &) {});
}
TEST_F(RefactoringEngine, EngineIsNotUsableForUnusableServer)
{
ASSERT_FALSE(engine.isRefactoringEngineAvailable());