compilerplugins/clang/pluginhandler.cxx | 7 +++++++ compilerplugins/clang/pluginhandler.hxx | 5 +++++ 2 files changed, 12 insertions(+)
New commits: commit 311fb9d5e61fa3cab40b85434e22d288c974939b Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Aug 11 15:16:08 2014 +0200 Adapt compilerplugins to Clang trunk towards 3.6 Change-Id: I0b7be1616a3e4206982f9f925de141ed9d53b96e diff --git a/compilerplugins/clang/pluginhandler.cxx b/compilerplugins/clang/pluginhandler.cxx index 065bd1a..0a5af66 100644 --- a/compilerplugins/clang/pluginhandler.cxx +++ b/compilerplugins/clang/pluginhandler.cxx @@ -241,10 +241,17 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context ) } } +#if (__clang_major__ == 3 && __clang_minor__ >= 6) || __clang_major__ > 3 +std::unique_ptr<ASTConsumer> LibreOfficeAction::CreateASTConsumer( CompilerInstance& Compiler, StringRef ) + { + return make_unique<PluginHandler>( Compiler, _args ); + } +#else ASTConsumer* LibreOfficeAction::CreateASTConsumer( CompilerInstance& Compiler, StringRef ) { return new PluginHandler( Compiler, _args ); } +#endif bool LibreOfficeAction::ParseArgs( const CompilerInstance&, const vector< string >& args ) { diff --git a/compilerplugins/clang/pluginhandler.hxx b/compilerplugins/clang/pluginhandler.hxx index 48cee8e..b4fc0c3 100644 --- a/compilerplugins/clang/pluginhandler.hxx +++ b/compilerplugins/clang/pluginhandler.hxx @@ -54,7 +54,12 @@ class LibreOfficeAction : public PluginASTAction { public: +#if (__clang_major__ == 3 && __clang_minor__ >= 6) || __clang_major__ > 3 + virtual std::unique_ptr<ASTConsumer> CreateASTConsumer( CompilerInstance& Compiler, StringRef InFile ); +#else virtual ASTConsumer* CreateASTConsumer( CompilerInstance& Compiler, StringRef InFile ); +#endif + virtual bool ParseArgs( const CompilerInstance& CI, const vector< string >& args ); private: vector< string > _args; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits