diff --git a/lib/Refactoring/Refactoring.cpp b/lib/Refactoring/Refactoring.cpp index a6dcd39c94aae..e7b2f7ad3eced 100644 --- a/lib/Refactoring/Refactoring.cpp +++ b/lib/Refactoring/Refactoring.cpp @@ -49,7 +49,7 @@ class ContextFinder : public SourceEntityWalker { ASTContext &Ctx; SourceManager &SM; SourceRange Target; - function_ref IsContext; + std::function IsContext; SmallVector AllContexts; bool contains(ASTNode Enclosing) { auto Result = SM.rangeContains(Enclosing.getSourceRange(), Target); @@ -59,12 +59,12 @@ class ContextFinder : public SourceEntityWalker { } public: ContextFinder(SourceFile &SF, ASTNode TargetNode, - function_ref IsContext = + std::function IsContext = [](ASTNode N) { return true; }) : SF(SF), Ctx(SF.getASTContext()), SM(Ctx.SourceMgr), Target(TargetNode.getSourceRange()), IsContext(IsContext) {} ContextFinder(SourceFile &SF, SourceLoc TargetLoc, - function_ref IsContext = + std::function IsContext = [](ASTNode N) { return true; }) : SF(SF), Ctx(SF.getASTContext()), SM(Ctx.SourceMgr), Target(TargetLoc), IsContext(IsContext) {