loplugin:passstuffbyref

Change-Id: I785e96599bbda029adf4698d11d7f981750dec07
Reviewed-on: https://gerrit.libreoffice.org/54802
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-05-25 14:08:33 +02:00
parent 305285bd14
commit ff3bdde252
27 changed files with 44 additions and 40 deletions

View File

@@ -274,6 +274,10 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
if (startswith(type.getAsString(), "struct o3tl::strong_int")) {
return;
}
// extremely simple class, might as well pass by value
if (loplugin::TypeCheck(functionDecl->getReturnType()).Class("Color")) {
return;
}
// functionDecl->dump();