diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-03 13:09:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-03 13:40:39 +0100 |
commit | 9f5eb314b0fc74d3779a8ce8116aa219ab82d5aa (patch) | |
tree | b8ee160f1b86df87b94eeccde38ef28cd7c29891 /compilerplugins/clang/unusedfields.cxx | |
parent | 5dd4c96874db50be7af2a6f3514091c240d0967c (diff) |
loplugin:unusedfields
tweak plugin with the name of another clone method
Change-Id: I47193d31f53f48297c9e773da375c7255ddde282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87852
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/unusedfields.cxx')
-rw-r--r-- | compilerplugins/clang/unusedfields.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compilerplugins/clang/unusedfields.cxx b/compilerplugins/clang/unusedfields.cxx index fb1a16a0c13f..98c5a30d6a1d 100644 --- a/compilerplugins/clang/unusedfields.cxx +++ b/compilerplugins/clang/unusedfields.cxx @@ -398,7 +398,10 @@ bool UnusedFields::TraverseCXXMethodDecl(CXXMethodDecl* cxxMethodDecl) { if (cxxMethodDecl->isCopyAssignmentOperator() || cxxMethodDecl->isMoveAssignmentOperator() - || (cxxMethodDecl->getIdentifier() && (cxxMethodDecl->getName().startswith("Clone") || cxxMethodDecl->getName().startswith("clone")))) + || (cxxMethodDecl->getIdentifier() + && (cxxMethodDecl->getName().startswith("Clone") + || cxxMethodDecl->getName().startswith("clone") + || cxxMethodDecl->getName().startswith("createClone")))) insideMoveOrCopyOrCloneDeclParent = cxxMethodDecl->getParent(); // these are similar in that they tend to simply enumerate all the fields of an object without putting // them to some useful purpose |