From 92da39d5f94c7824099c79c8554cd2b16f0d7929 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 16 Nov 2016 14:15:29 +0200 Subject: update couple of loplugins for move constructors Change-Id: I82140569a3e09225065d721e4aeac5c5fe93bc45 --- compilerplugins/clang/unusedmethods.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compilerplugins/clang/unusedmethods.cxx') 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(functionDecl) && dyn_cast(functionDecl)->isCopyConstructor()) { + if (isa(functionDecl) + && dyn_cast(functionDecl)->isCopyOrMoveConstructor()) + { return true; } if (!canonicalFunctionDecl->getLocation().isValid() || ignoreLocation(canonicalFunctionDecl)) { -- cgit