summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-20 12:01:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-20 12:03:37 +0200
commit6a24b52b828912b9136b343ec837f02336f33232 (patch)
tree7cb5c2cbc0f3a7b7e44dd16426397462536d1f62 /compilerplugins
parent8ed77fae3e5e9e5f7409e03d5e4586f428a65c86 (diff)
fix for older clang in loplugins
since commit 03ee996717dcf9e20529a6a3295df69d0d86dcce "loplugin:unusedfields fix more false +" Change-Id: Ief935fea8c554707db38b4ede4fab2ec1adca997
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unusedfields.cxx5
1 files changed, 4 insertions, 1 deletions
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);