Update documentation to match recent API change. newFrontendActionFactory now returns a unique_ptr.

llvm-svn: 207789
This commit is contained in:
Richard Smith 2014-05-01 20:04:39 +00:00
parent 6f68758358
commit 06900a0ffb
2 changed files with 4 additions and 4 deletions

View File

@ -153,7 +153,7 @@ documentation <LibTooling.html>`_.
CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);
ClangTool Tool(OptionsParser.getCompilations(),
OptionsParser.getSourcePathList());
return Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>());
return Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>().get());
}
And that's it! You can compile our new tool by running ninja from the
@ -299,7 +299,7 @@ And change ``main()`` to:
MatchFinder Finder;
Finder.addMatcher(LoopMatcher, &Printer);
return Tool.run(newFrontendActionFactory(&Finder));
return Tool.run(newFrontendActionFactory(&Finder).get());
}
Now, you should be able to recompile and run the code to discover for

View File

@ -99,7 +99,7 @@ our ``FrontendAction`` over some code. For example, to run the
// on. Thus, it takes a FrontendActionFactory as parameter. To create a
// FrontendActionFactory from a given FrontendAction type, we call
// newFrontendActionFactory<clang::SyntaxOnlyAction>().
int result = Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>());
int result = Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>().get());
Putting it together --- the first tool
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -136,7 +136,7 @@ version of this example tool is also checked into the clang tree at
CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);
ClangTool Tool(OptionsParser.getCompilations(),
OptionsParser.getSourcePathList());
return Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>());
return Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>().get());
}
Running the tool on some code