From b54f46a848bf54b2bcb9e1dfbb3b3685e67adfd8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 27 Mar 2019 08:49:47 +0100 Subject: [PATCH] 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 --- compilerplugins/clang/typedefparam.cxx | 7 +++++++ 1 file changed, 7 insertions(+) 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(lhsType)) + { + auto rhsAttr = dyn_cast(rhsType); + if (!rhsAttr) + return false; + return areTypesEqual(lhsAttr->getModifiedType(), rhsAttr->getModifiedType()); + } return lhsType == rhsType; }