diff --git a/cmake/CLANGConfig.cmake b/cmake/CLANGConfig.cmake index 60d91341..8d4f0c29 100644 --- a/cmake/CLANGConfig.cmake +++ b/cmake/CLANGConfig.cmake @@ -35,7 +35,6 @@ set(CLANG_LIBRARIES clangStaticAnalyzerCore clangAnalysis clangRewriteFrontend - clangRewriteCore clangEdit clangAST clangLex diff --git a/src/lib/data/parser/cxx/ASTAction.cpp b/src/lib/data/parser/cxx/ASTAction.cpp index 3778bc13..1466ea78 100644 --- a/src/lib/data/parser/cxx/ASTAction.cpp +++ b/src/lib/data/parser/cxx/ASTAction.cpp @@ -9,7 +9,7 @@ ASTAction::~ASTAction() { } -clang::ASTConsumer* ASTAction::CreateASTConsumer(clang::CompilerInstance& compiler, llvm::StringRef inFile) +std::unique_ptr ASTAction::CreateASTConsumer(clang::CompilerInstance& compiler, llvm::StringRef inFile) { - return new ASTConsumer(&compiler.getASTContext(), m_client); + return std::unique_ptr(new ASTConsumer(&compiler.getASTContext(), m_client)); } diff --git a/src/lib/data/parser/cxx/ASTAction.h b/src/lib/data/parser/cxx/ASTAction.h index abef9f57..b9b7b64c 100644 --- a/src/lib/data/parser/cxx/ASTAction.h +++ b/src/lib/data/parser/cxx/ASTAction.h @@ -12,7 +12,7 @@ public: explicit ASTAction(ParserClient* client); virtual ~ASTAction(); - virtual clang::ASTConsumer* CreateASTConsumer(clang::CompilerInstance& compiler, llvm::StringRef inFile); + virtual std::unique_ptr CreateASTConsumer(clang::CompilerInstance& compiler, llvm::StringRef inFile); private: ParserClient* m_client;