Kaydet (Commit) 92da39d5 authored tarafından Noel Grandin's avatar Noel Grandin

update couple of loplugins for move constructors

Change-Id: I82140569a3e09225065d721e4aeac5c5fe93bc45
üst ac4f8463
......@@ -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)) {
......
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment