[Libreoffice-commits] core.git: compilerplugins/clang
Noel Grandin
noel.grandin at collabora.co.uk
Tue Jun 20 10:04:08 UTC 2017
compilerplugins/clang/unusedfields.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 6a24b52b828912b9136b343ec837f02336f33232
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Jun 20 12:01:10 2017 +0200
fix for older clang in loplugins
since commit 03ee996717dcf9e20529a6a3295df69d0d86dcce
"loplugin:unusedfields fix more false +"
Change-Id: Ief935fea8c554707db38b4ede4fab2ec1adca997
diff --git a/compilerplugins/clang/unusedfields.cxx b/compilerplugins/clang/unusedfields.cxx
index 07eecf2b6771..66c99f48d281 100644
--- a/compilerplugins/clang/unusedfields.cxx
+++ b/compilerplugins/clang/unusedfields.cxx
@@ -241,7 +241,10 @@ bool UnusedFields::VisitMemberExpr( const MemberExpr* memberExpr )
break;
}
if (isa<CastExpr>(parent) || isa<MemberExpr>(parent) || isa<ParenExpr>(parent) || isa<ParenListExpr>(parent)
- || isa<ExprWithCleanups>(parent) || isa<ArrayInitLoopExpr>(parent))
+#if CLANG_VERSION >= 30900
+ || isa<ArrayInitLoopExpr>(parent)
+#endif
+ || isa<ExprWithCleanups>(parent))
{
child = parent;
auto parentsRange = compiler.getASTContext().getParents(*parent);
More information about the Libreoffice-commits
mailing list