From 9f4491477b4bc221527633467c17c2529f1f0714 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 28 Nov 2017 09:47:22 +0100 Subject: 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 Tested-by: Stephan Bergmann --- compilerplugins/clang/unusedmethods.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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& 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); -- cgit