summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-05-31 09:18:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-05-31 09:18:08 +0200
commitbef247d1370d9a5a83bfd2ccde70db37da0e7f30 (patch)
treec17e6a71da16a94cfa4a8f0eb5d93780ded7e861 /compilerplugins
parent053e17be4be26b4c81b52bd15552cb3bfec24aea (diff)
DataRecursionQueue was only introduced in Clang 3.8
(r253948 "Use data recursion in RecursiveASTVisitor when traversing Stmt and Expr nodes") Change-Id: I393474048ecbe0f6b7f19f00c2f830f495b2b6f0
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/redundantcast.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx
index 8b5eb3d90e91..2c9a6fa49c89 100644
--- a/compilerplugins/clang/redundantcast.cxx
+++ b/compilerplugins/clang/redundantcast.cxx
@@ -80,12 +80,19 @@ public:
}
bool TraverseInitListExpr(
- InitListExpr * expr, DataRecursionQueue * queue = nullptr)
+ InitListExpr * expr
+#if CLANG_VERSION >= 30800
+ , DataRecursionQueue * queue = nullptr
+#endif
+ )
{
return WalkUpFromInitListExpr(expr)
&& TraverseSynOrSemInitListExpr(
- expr->isSemanticForm() ? expr : expr->getSemanticForm(),
- queue);
+ expr->isSemanticForm() ? expr : expr->getSemanticForm()
+#if CLANG_VERSION >= 30800
+ , queue
+#endif
+ );
}
bool VisitImplicitCastExpr(ImplicitCastExpr const * expr);