diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-16 14:15:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-16 14:16:09 +0200 |
commit | 92da39d5f94c7824099c79c8554cd2b16f0d7929 (patch) | |
tree | 2b121884db0c41a5955c1d2e2f7986982f3636ea /compilerplugins | |
parent | ac4f846335fb71f4a11bae6f8f1704ca915ba6af (diff) |
update couple of loplugins for move constructors
Change-Id: I82140569a3e09225065d721e4aeac5c5fe93bc45
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/expandablemethods.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/unusedmethods.cxx | 4 |
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)) { |