[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann sbergman at redhat.com
Wed May 31 07:20:14 UTC 2017


 compilerplugins/clang/redundantcast.cxx |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit bef247d1370d9a5a83bfd2ccde70db37da0e7f30
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed May 31 09:18:08 2017 +0200

    DataRecursionQueue was only introduced in Clang 3.8
    
    (r253948 "Use data recursion in RecursiveASTVisitor when traversing Stmt and
    Expr nodes")
    
    Change-Id: I393474048ecbe0f6b7f19f00c2f830f495b2b6f0

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);


More information about the Libreoffice-commits mailing list