From b6139e055d2524626180876c83c199d5d08a3e4f Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Tue, 12 Sep 2017 13:03:42 +0000 Subject: [PATCH] Fix GCC build error and warnings from r313025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313027 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Tooling/RefactoringActionRulesTest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/unittests/Tooling/RefactoringActionRulesTest.cpp b/unittests/Tooling/RefactoringActionRulesTest.cpp index 72f14e7d7c..62c751ac12 100644 --- a/unittests/Tooling/RefactoringActionRulesTest.cpp +++ b/unittests/Tooling/RefactoringActionRulesTest.cpp @@ -42,6 +42,9 @@ createReplacements(const std::unique_ptr &Rule, void handle(AtomicChanges SourceReplacements) override { Result = std::move(SourceReplacements); } + void handle(SymbolOccurrences Occurrences) override { + RefactoringResultConsumer::handle(std::move(Occurrences)); + } public: Optional> Result; @@ -183,6 +186,9 @@ Optional findOccurrences(RefactoringActionRule &Rule, void handle(SymbolOccurrences Occurrences) override { Result = std::move(Occurrences); } + void handle(AtomicChanges Changes) override { + RefactoringResultConsumer::handle(std::move(Changes)); + } public: Optional Result; @@ -201,7 +207,7 @@ TEST_F(RefactoringActionRulesTest, ReturnSymbolOccurrences) { Occurrences.push_back(SymbolOccurrence( SymbolName("test"), SymbolOccurrence::MatchingSymbol, Selection.getRange().getBegin())); - return Occurrences; + return std::move(Occurrences); }, requiredSelection( selection::identity())); -- 2.40.0