summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-03-27 08:49:47 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-03-27 10:59:35 +0100
commitb54f46a848bf54b2bcb9e1dfbb3b3685e67adfd8 (patch)
treece82c17bf2d0e07ed8cd012effc12a8b38cc4913 /compilerplugins
parented43570bc2bdfe4fed34de2eee8ff0c80b9299ed (diff)
Adpat loplugin:typedefparam to AttributedType
...as seen by clang-cl when there are function parameters of function pointer type involving SAL_CALL Change-Id: Ie35f00d4e15ca777b14dd5968cdbd97e43bca1a1 Reviewed-on: https://gerrit.libreoffice.org/69789 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/typedefparam.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/compilerplugins/clang/typedefparam.cxx b/compilerplugins/clang/typedefparam.cxx
index fe6ebba78f0f..d5b3a76103c9 100644
--- a/compilerplugins/clang/typedefparam.cxx
+++ b/compilerplugins/clang/typedefparam.cxx
@@ -273,6 +273,13 @@ static bool areTypesEqual(QualType lhs, QualType rhs)
return false;
return areTypesEqual(lhsDecayed->getAdjustedType(), rhsDecayed->getAdjustedType());
}
+ if (auto lhsAttr = dyn_cast<AttributedType>(lhsType))
+ {
+ auto rhsAttr = dyn_cast<AttributedType>(rhsType);
+ if (!rhsAttr)
+ return false;
+ return areTypesEqual(lhsAttr->getModifiedType(), rhsAttr->getModifiedType());
+ }
return lhsType == rhsType;
}