compilerplugins/clang/passstuffbyref.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit d150eab88ee26d5c05a6d662a2c13c6adea8ad78 Author: Stephan Bergmann <[email protected]> Date: Mon Jun 13 09:22:13 2016 +0200 loplugin:passstuffbyref: For now disable "pass parm by value" warnings That needs fixing, to check that the parm is not bound to a reference, cf. <https://gerrit.libreoffice.org/#/c/26189/> "coverity#1362680 Pointer to local outside scope". Change-Id: I3656354ccd10affafa006c9e46cf1db608b5b2a7 diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index ca2283c..2768b81 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -106,6 +106,7 @@ void PassStuffByRef::checkParams(const FunctionDecl * functionDecl) { const ParmVarDecl * pvDecl = functionDecl->getParamDecl(i); auto const t = pvDecl->getType(); if (isPrimitiveConstRef(t)) { +#if 0 //TODO: check that the parm is not bound to a reference report( DiagnosticsEngine::Warning, ("passing primitive type param %0 by const &, rather pass by value"), @@ -118,6 +119,7 @@ void PassStuffByRef::checkParams(const FunctionDecl * functionDecl) { can->getLocation()) << can->getSourceRange(); } +#endif } } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
