diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-05-01 20:04:39 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-05-01 20:04:39 +0000 |
| commit | 2bc825e5e3dbc93d19372de6a45f3b23e3162746 (patch) | |
| tree | cc044ef0d24a141642669915ac14b03c3f800e12 /docs | |
| parent | c355489f780ec8ac302626bfc9a2f00a000845df (diff) | |
| download | clang-2bc825e5e3dbc93d19372de6a45f3b23e3162746.tar.gz clang-2bc825e5e3dbc93d19372de6a45f3b23e3162746.tar.bz2 clang-2bc825e5e3dbc93d19372de6a45f3b23e3162746.tar.xz | |
Update documentation to match recent API change. newFrontendActionFactory now returns a unique_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/LibASTMatchersTutorial.rst | 4 | ||||
| -rw-r--r-- | docs/LibTooling.rst | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/LibASTMatchersTutorial.rst b/docs/LibASTMatchersTutorial.rst index 13749fbc41..1e88ec203c 100644 --- a/docs/LibASTMatchersTutorial.rst +++ b/docs/LibASTMatchersTutorial.rst @@ -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 diff --git a/docs/LibTooling.rst b/docs/LibTooling.rst index 57f207f275..75ef6a0fe7 100644 --- a/docs/LibTooling.rst +++ b/docs/LibTooling.rst @@ -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 |
