diff --git a/clang/docs/RAVFrontendAction.rst b/clang/docs/RAVFrontendAction.rst --- a/clang/docs/RAVFrontendAction.rst +++ b/clang/docs/RAVFrontendAction.rst @@ -27,8 +27,7 @@ public: virtual std::unique_ptr CreateASTConsumer( clang::CompilerInstance &Compiler, llvm::StringRef InFile) { - return std::unique_ptr( - new FindNamedClassConsumer); + return std::make_unique(); } }; @@ -114,8 +113,7 @@ virtual std::unique_ptr CreateASTConsumer( clang::CompilerInstance &Compiler, llvm::StringRef InFile) { - return std::unique_ptr( - new FindNamedClassConsumer(&Compiler.getASTContext())); + return std::make_unique(&Compiler.getASTContext()); } Now that the ASTContext is available in the RecursiveASTVisitor, we can @@ -189,8 +187,7 @@ public: virtual std::unique_ptr CreateASTConsumer( clang::CompilerInstance &Compiler, llvm::StringRef InFile) { - return std::unique_ptr( - new FindNamedClassConsumer(&Compiler.getASTContext())); + return std::make_unique(&Compiler.getASTContext()); } };