diff options
author | Manuel Klimek <klimek@google.com> | 2012-07-05 18:13:01 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2012-07-05 18:13:01 +0000 |
commit | e6df0ce08fcdf9f906556d98cca96d38ab440bba (patch) | |
tree | f28e0ad159fa0e02a49af323145b39f1345c471d /unittests/Tooling/ToolingTest.cpp | |
parent | 1176bcdb21945c7913d684973887e6f588a49236 (diff) |
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
Diffstat (limited to 'unittests/Tooling/ToolingTest.cpp')
-rw-r--r-- | unittests/Tooling/ToolingTest.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unittests/Tooling/ToolingTest.cpp b/unittests/Tooling/ToolingTest.cpp index f6681f8153..fb3af2678c 100644 --- a/unittests/Tooling/ToolingTest.cpp +++ b/unittests/Tooling/ToolingTest.cpp @@ -104,7 +104,9 @@ TEST(newFrontendActionFactory, CreatesFrontendActionFactoryFromType) { } struct IndependentFrontendActionCreator { - FrontendAction *newFrontendAction() { return new SyntaxOnlyAction; } + ASTConsumer *newASTConsumer() { + return new FindTopLevelDeclConsumer(NULL); + } }; TEST(newFrontendActionFactory, CreatesFrontendActionFactoryFromFactoryType) { |