compilerplugins/clang/unusedmethods.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 9f4491477b4bc221527633467c17c2529f1f0714
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Nov 28 09:47:22 2017 +0100

    Add back UnusedMethods::TraverseCXXDeductionGuideDecl, properly ifdef'ed
    
    ...as is already done in 65d6c642590bd5f51c04228d941608322a85f1ac
    "loplugin:casttovoid".  (This reverts 
5eec6db4addd7cc665222e1a4d05c35b13719847
    "fix loplugin unusedmethods".)
    
    Change-Id: Ibe6a7d9ce58aa70707538854ac64ad07022ea7b6
    Reviewed-on: https://gerrit.libreoffice.org/45388
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Tested-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/compilerplugins/clang/unusedmethods.cxx 
b/compilerplugins/clang/unusedmethods.cxx
index 1a707de5893a..549bb2bb6766 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -118,6 +118,9 @@ public:
     bool TraverseFunctionDecl( FunctionDecl* );
     bool TraverseCXXMethodDecl( CXXMethodDecl* );
     bool TraverseCXXConversionDecl( CXXConversionDecl* );
+#if CLANG_VERSION >= 50000
+    bool TraverseCXXDeductionGuideDecl( CXXDeductionGuideDecl* );
+#endif
 private:
     void logCallToRootMethods(const FunctionDecl* functionDecl, 
std::set<MyFuncInfo>& funcSet);
     MyFuncInfo niceName(const FunctionDecl* functionDecl);
@@ -387,6 +390,16 @@ bool 
UnusedMethods::TraverseCXXConversionDecl(CXXConversionDecl* f)
     currentFunctionDecl = copy;
     return ret;
 }
+#if CLANG_VERSION >= 50000
+bool UnusedMethods::TraverseCXXDeductionGuideDecl(CXXDeductionGuideDecl* f)
+{
+    auto copy = currentFunctionDecl;
+    currentFunctionDecl = f;
+    bool ret = RecursiveASTVisitor::TraverseCXXDeductionGuideDecl(f);
+    currentFunctionDecl = copy;
+    return ret;
+}
+#endif
 
 loplugin::Plugin::Registration< UnusedMethods > X("unusedmethods", false);
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to