summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/pluginhandler.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-11 15:16:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-11 15:16:08 +0200
commit311fb9d5e61fa3cab40b85434e22d288c974939b (patch)
tree9d3155415efa73ccda885510f4cccdf8a8617fde /compilerplugins/clang/pluginhandler.cxx
parent6d5e69072e7c37f8ff4adb49062218ab17373e7d (diff)
Adapt compilerplugins to Clang trunk towards 3.6
Change-Id: I0b7be1616a3e4206982f9f925de141ed9d53b96e
Diffstat (limited to 'compilerplugins/clang/pluginhandler.cxx')
-rw-r--r--compilerplugins/clang/pluginhandler.cxx7
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 )
{