diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 09:32:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 20:10:57 +0200 |
commit | 31f04378dbc07d4367dc3b66163aaed171cf0323 (patch) | |
tree | 803e8caa6fa9cecdab5e1a0047fbd334fd2ab1ee /compilerplugins/clang | |
parent | 2836b78b54650d117282a9a345677d1b4d9fc043 (diff) |
loplugin:passstuffbyref
Change-Id: Icb7c22cf4ac95eab54d04e79312fb471ca27bceb
Reviewed-on: https://gerrit.libreoffice.org/74246
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/passstuffbyref.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index 1fd14619b62f..cff1e781455c 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -271,6 +271,18 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C .GlobalNamespace()) { return; } + // hides a constructor + if (dc.Function("createNonOwningCopy").Class("SortedAutoCompleteStrings").Namespace("editeng") + .GlobalNamespace()) { + return; + } + // template function + if (dc.Function("convertItems").Class("ValueParser").Namespace("configmgr").GlobalNamespace() + || dc.Function("parseListValue").AnonymousNamespace().Namespace("configmgr").GlobalNamespace() + || dc.Function("parseSingleValue").AnonymousNamespace().Namespace("configmgr").GlobalNamespace() + || dc.Function("Create").Class("HandlerComponentBase").Namespace("pcr").GlobalNamespace()) { + return; + } if (startswith(type.getAsString(), "struct o3tl::strong_int")) { return; } |