diff options
Diffstat (limited to 'compilerplugins/clang/pluginhandler.cxx')
-rw-r--r-- | compilerplugins/clang/pluginhandler.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compilerplugins/clang/pluginhandler.cxx b/compilerplugins/clang/pluginhandler.cxx index 065bd1a5d2e4..0a5af667e9db 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 ) { |