diff options
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)) { |