summaryrefslogtreecommitdiff
path: root/compilerplugins/clang
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/passstuffbyref.cxx4
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();