diff options
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/constantparam.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/countusersofdefaultparams.cxx | 6 | ||||
-rw-r--r-- | compilerplugins/clang/expandablemethods.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/methodcycles.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/unusedmethods.cxx | 2 |
5 files changed, 16 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(); diff --git a/compilerplugins/clang/countusersofdefaultparams.cxx b/compilerplugins/clang/countusersofdefaultparams.cxx index 0f434689a6c2..b469833b27b9 100644 --- a/compilerplugins/clang/countusersofdefaultparams.cxx +++ b/compilerplugins/clang/countusersofdefaultparams.cxx @@ -93,8 +93,10 @@ void CountUsersOfDefaultParams::niceName(const FunctionDecl* functionDecl, MyFun { 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(); @@ -155,8 +157,10 @@ bool CountUsersOfDefaultParams::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(); int n = functionDecl->getNumParams() - 1; @@ -184,8 +188,10 @@ bool CountUsersOfDefaultParams::VisitCXXConstructExpr(const CXXConstructExpr * c // work our way back to the root definition for template methods if (constructorDecl->getInstantiatedFromMemberFunction()) constructorDecl = dyn_cast<CXXConstructorDecl>(constructorDecl->getInstantiatedFromMemberFunction()); +#if CLANG_VERSION < 90000 else if (constructorDecl->getClassScopeSpecializationPattern()) constructorDecl = dyn_cast<CXXConstructorDecl>(constructorDecl->getClassScopeSpecializationPattern()); +#endif else if (constructorDecl->getTemplateInstantiationPattern()) constructorDecl = dyn_cast<CXXConstructorDecl>(constructorDecl->getTemplateInstantiationPattern()); int n = constructorDecl->getNumParams() - 1; diff --git a/compilerplugins/clang/expandablemethods.cxx b/compilerplugins/clang/expandablemethods.cxx index 8277ae838028..e91a3c0ecf4c 100644 --- a/compilerplugins/clang/expandablemethods.cxx +++ b/compilerplugins/clang/expandablemethods.cxx @@ -114,8 +114,10 @@ MyFuncInfo ExpandableMethods::niceName(const FunctionDecl* functionDecl) { 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(); diff --git a/compilerplugins/clang/methodcycles.cxx b/compilerplugins/clang/methodcycles.cxx index fb1a88b80a94..0a57e5d38a7b 100644 --- a/compilerplugins/clang/methodcycles.cxx +++ b/compilerplugins/clang/methodcycles.cxx @@ -126,8 +126,10 @@ MyFuncInfo MethodCycles::niceName(const FunctionDecl* functionDecl) { 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(); diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx index 8ca645335c43..e24fec99c3d2 100644 --- a/compilerplugins/clang/unusedmethods.cxx +++ b/compilerplugins/clang/unusedmethods.cxx @@ -132,8 +132,10 @@ MyFuncInfo UnusedMethods::niceName(const FunctionDecl* functionDecl) { 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(); |