diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-25 14:08:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-25 21:46:32 +0200 |
commit | ff3bdde2527123fc9e011ff0d93e958174632186 (patch) | |
tree | 07d86dceca57fc1c85ad208fb436d70ac7e648ab /compilerplugins/clang/passstuffbyref.cxx | |
parent | 305285bd1450bb847058a877b0dc2adface4e521 (diff) |
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>
Diffstat (limited to 'compilerplugins/clang/passstuffbyref.cxx')
-rw-r--r-- | compilerplugins/clang/passstuffbyref.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index 8cfae946f041..61bd3cf0f00c 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -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(); |