diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-05-02 20:55:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-05-03 10:21:26 +0200 |
commit | a010011fd362536beb8d1cd44cf058180f7c06ec (patch) | |
tree | 1819d3550ec212cb075a48ddea4314225454c647 /compilerplugins/clang/constantparam.cxx | |
parent | f20810f7829d9f3b7167df316e1303810b746366 (diff) |
Fix building compilerplugins with Clang trunk towards Clang 9
...after <https://github.com/llvm/llvm-project/commit/
f19a8b05171a67a290e7d3bd6eba0c95c7b3259c> "Replace ad-hoc tracking of pattern
for an instantiated class-scope" removed
ASTContext::getClassScopeSpecializationPattern. None of the affected plugins
are enabled by default (nor checked by
solenv/CompilerTest_compilerplugins_clang.mk), so just make sure they still
compile, leaving any potentially necessary adaptions to another commit.
Change-Id: I7102851409e78eff284b50337f7ad0f721e1e548
Reviewed-on: https://gerrit.libreoffice.org/71702
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/constantparam.cxx')
-rw-r--r-- | compilerplugins/clang/constantparam.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compilerplugins/clang/constantparam.cxx b/compilerplugins/clang/constantparam.cxx index ffacf1102022..7fab25406236 100644 --- a/compilerplugins/clang/constantparam.cxx +++ b/compilerplugins/clang/constantparam.cxx @@ -104,8 +104,10 @@ void ConstantParam::addToCallSet(const FunctionDecl* functionDecl, int paramInde { if (functionDecl->getInstantiatedFromMemberFunction()) functionDecl = functionDecl->getInstantiatedFromMemberFunction(); +#if CLANG_VERSION < 90000 else if (functionDecl->getClassScopeSpecializationPattern()) functionDecl = functionDecl->getClassScopeSpecializationPattern(); +#endif else if (functionDecl->getTemplateInstantiationPattern()) functionDecl = functionDecl->getTemplateInstantiationPattern(); @@ -252,8 +254,10 @@ bool ConstantParam::VisitCallExpr(const CallExpr * callExpr) { // work our way back to the root definition for template methods if (functionDecl->getInstantiatedFromMemberFunction()) functionDecl = functionDecl->getInstantiatedFromMemberFunction(); +#if CLANG_VERSION < 90000 else if (functionDecl->getClassScopeSpecializationPattern()) functionDecl = functionDecl->getClassScopeSpecializationPattern(); +#endif else if (functionDecl->getTemplateInstantiationPattern()) functionDecl = functionDecl->getTemplateInstantiationPattern(); |