[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Tue Nov 28 13:09:55 UTC 2017
compilerplugins/clang/unusedmethods.cxx | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit 9f4491477b4bc221527633467c17c2529f1f0714
Author: Stephan Bergmann <sbergman at 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 <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at 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);
More information about the Libreoffice-commits
mailing list