compilerplugins/clang/sequenceloop.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 9a251699d728fa6207b71406cd91aafb7803f453 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Aug 23 09:05:46 2019 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Aug 23 14:40:19 2019 +0200 Improve loplugin:sequenceloop warning ...from > sfx2/source/appl/shutdowniconaqua.mm:416:13: error: use std::as_const, or make range var const, to avoid creating a copy of the Sequence [loplugin:sequenceloop] > for ( auto const & newMenuProp : aNewMenu ) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to > sfx2/source/appl/shutdowniconaqua.mm:416:46: error: use std::as_const, or make range var const, to avoid creating a copy of the Sequence [loplugin:sequenceloop] > for ( auto const & newMenuProp : aNewMenu ) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ Change-Id: I1eabe80abeed1784a246a6e3c9b7036f664ee681 Reviewed-on: https://gerrit.libreoffice.org/77989 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/compilerplugins/clang/sequenceloop.cxx b/compilerplugins/clang/sequenceloop.cxx index 340412a5137a..735c57d21b8e 100644 --- a/compilerplugins/clang/sequenceloop.cxx +++ b/compilerplugins/clang/sequenceloop.cxx @@ -64,7 +64,7 @@ bool SequenceLoop::VisitCXXForRangeStmt(CXXForRangeStmt const* forStmt) report(DiagnosticsEngine::Warning, "use std::as_const, or make range var const, to avoid creating a copy of the Sequence", - compat::getBeginLoc(forStmt)) + compat::getBeginLoc(forStmt->getRangeInit())) << forStmt->getSourceRange(); return true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits