diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-30 14:36:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-31 16:03:43 +0100 |
commit | 17ee20b161cf5825e25d120c84675d11f7282256 (patch) | |
tree | 8151eee99d8864a0cdff485a440f93e5607b09b0 /compilerplugins | |
parent | d4d0b1a2b9f11fb7629559e08c345697ba129c04 (diff) |
loplugin:passstuffbyref improved return in emfio,writerfilter
Change-Id: I237936d62d0f1b17574dd88b5c9de932dc03238e
Reviewed-on: https://gerrit.libreoffice.org/47214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/passstuffbyref.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index a9c134882b14..cb7ac1366c70 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -250,7 +250,8 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C || (dc.MemberFunction().Class("Submission").Namespace("xforms") .GlobalNamespace()) || (dc.Function("TopLeft").Class("SwRect").GlobalNamespace()) - || (dc.Function("ConvDicList_CreateInstance").GlobalNamespace())) + || (dc.Function("ConvDicList_CreateInstance").GlobalNamespace()) + || (dc.Function("Create").Class("OUnoAutoPilot").Namespace("dbp").GlobalNamespace())) { return; } @@ -349,6 +350,9 @@ bool PassStuffByRef::isReturnExprDisqualified(const Expr* expr) if (isa<CXXBindTemporaryExpr>(expr)) { return true; } + if (isa<InitListExpr>(expr)) { + return true; + } expr = expr->IgnoreParenCasts(); if (auto childExpr = dyn_cast<ArraySubscriptExpr>(expr)) { expr = childExpr->getLHS(); |