summaryrefslogtreecommitdiffstats
path: root/compilerplugins/clang
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-16 14:15:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-16 14:16:09 +0200
commit92da39d5f94c7824099c79c8554cd2b16f0d7929 (patch)
tree2b121884db0c41a5955c1d2e2f7986982f3636ea /compilerplugins/clang
parentgtk: under wayland tracking the window position is worthless (diff)
downloadcore-92da39d5f94c7824099c79c8554cd2b16f0d7929.tar.gz
core-92da39d5f94c7824099c79c8554cd2b16f0d7929.zip
update couple of loplugins for move constructors
Change-Id: I82140569a3e09225065d721e4aeac5c5fe93bc45
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/expandablemethods.cxx4
-rw-r--r--compilerplugins/clang/unusedmethods.cxx4
2 files changed, 6 insertions, 2 deletions
diff --git a/compilerplugins/clang/expandablemethods.cxx b/compilerplugins/clang/expandablemethods.cxx
index 308c8f17c36a..a5a2dfda2278 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 d3345d8f8b6a..98f19ac4a00f 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)) {