diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-03 08:55:35 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-03 08:56:01 +0100 |
commit | 24a89b277208d8f3fa7987f5fe76a02286bbff25 (patch) | |
tree | 706fcecaac450eba86b29ac75ee36973e0f4a37b /compilerplugins/clang/passstuffbyref.cxx | |
parent | 8acdf876c52240c5f3c6d428162b15d4e89f32a7 (diff) |
Improve loplugin:passstuffbyref
Change-Id: I88ab4c51ff59312127681d3087d22b9c79192b94
Diffstat (limited to 'compilerplugins/clang/passstuffbyref.cxx')
-rw-r--r-- | compilerplugins/clang/passstuffbyref.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index 9eb076884805..6d98dbf90341 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -47,7 +47,10 @@ bool PassStuffByRef::VisitFunctionDecl(const FunctionDecl * functionDecl) { } // only warn on the definition/prototype of the function, // not on the function implementation - if (functionDecl->isThisDeclarationADefinition() && functionDecl->getPreviousDecl() != nullptr) { + if ((functionDecl->isThisDeclarationADefinition() + && functionDecl->getPreviousDecl() != nullptr) + || functionDecl->isDeleted()) + { return true; } // only consider base declarations, not overriden ones, or we warn on methods that @@ -95,7 +98,7 @@ bool PassStuffByRef::VisitLambdaExpr(const LambdaExpr * expr) { } bool PassStuffByRef::isFat(QualType type, std::string * name) { - if (!type->isClassType()) { + if (!type->isRecordType()) { return false; } *name = type.getUnqualifiedType().getCanonicalType().getAsString(); |