[Libreoffice-commits] core.git: compilerplugins/clang
Noel Grandin
noel.grandin at collabora.co.uk
Wed Nov 16 12:18:37 UTC 2016
compilerplugins/clang/expandablemethods.cxx | 4 +++-
compilerplugins/clang/unusedmethods.cxx | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 92da39d5f94c7824099c79c8554cd2b16f0d7929
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Nov 16 14:15:29 2016 +0200
update couple of loplugins for move constructors
Change-Id: I82140569a3e09225065d721e4aeac5c5fe93bc45
diff --git a/compilerplugins/clang/expandablemethods.cxx b/compilerplugins/clang/expandablemethods.cxx
index 308c8f1..a5a2dfd 100644
--- a/compilerplugins/clang/expandablemethods.cxx
+++ b/compilerplugins/clang/expandablemethods.cxx
@@ -306,7 +306,9 @@ bool ExpandableMethods::isCalleeFunctionInteresting(const FunctionDecl* function
if (functionDecl->isDeleted() || functionDecl->isDefaulted()) {
return false;
}
- if (isa<CXXConstructorDecl>(functionDecl) && dyn_cast<CXXConstructorDecl>(functionDecl)->isCopyConstructor()) {
+ if (isa<CXXConstructorDecl>(functionDecl)
+ && dyn_cast<CXXConstructorDecl>(functionDecl)->isCopyOrMoveConstructor())
+ {
return false;
}
if (!functionDecl->getLocation().isValid() || ignoreLocation(functionDecl)) {
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index d3345d8..98f19ac 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -296,7 +296,9 @@ bool UnusedMethods::VisitFunctionDecl( const FunctionDecl* functionDecl )
if (functionDecl->isDeleted() || functionDecl->isDefaulted()) {
return true;
}
- if (isa<CXXConstructorDecl>(functionDecl) && dyn_cast<CXXConstructorDecl>(functionDecl)->isCopyConstructor()) {
+ if (isa<CXXConstructorDecl>(functionDecl)
+ && dyn_cast<CXXConstructorDecl>(functionDecl)->isCopyOrMoveConstructor())
+ {
return true;
}
if (!canonicalFunctionDecl->getLocation().isValid() || ignoreLocation(canonicalFunctionDecl)) {
More information about the Libreoffice-commits
mailing list