Adapts the FrontendAction convenience functions so that it can be
used with classes that generate ASTConsumers; this allows decoupling
the ASTConsumer generation from the Frontend library (like, for example,
the MatchFinder in the upcoming ASTMatcher patch).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159760 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Tooling/ToolingTest.cpp b/unittests/Tooling/ToolingTest.cpp
index f6681f8..fb3af26 100644
--- a/unittests/Tooling/ToolingTest.cpp
+++ b/unittests/Tooling/ToolingTest.cpp
@@ -104,7 +104,9 @@
 }
 
 struct IndependentFrontendActionCreator {
-  FrontendAction *newFrontendAction() { return new SyntaxOnlyAction; }
+  ASTConsumer *newASTConsumer() {
+    return new FindTopLevelDeclConsumer(NULL);
+  }
 };
 
 TEST(newFrontendActionFactory, CreatesFrontendActionFactoryFromFactoryType) {