diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-17 20:16:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-18 08:54:36 +0200 |
commit | f46740abc225f5b4c7f604bf3ef32c503c7fc858 (patch) | |
tree | 59942cedf60d33464df43305b550247d2e000edd /compilerplugins | |
parent | ca3557bedef8dd968f6455875f574357801902c7 (diff) |
loplugin:sequenceloop also check for B2DPolyPolygon
which has the same problem
Change-Id: I98f9924626f26739e91d6a9d21e4276473ea314d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120620
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/sequenceloop.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compilerplugins/clang/sequenceloop.cxx b/compilerplugins/clang/sequenceloop.cxx index 7f14d6c4d951..8c931d70d5d1 100644 --- a/compilerplugins/clang/sequenceloop.cxx +++ b/compilerplugins/clang/sequenceloop.cxx @@ -56,7 +56,10 @@ bool SequenceLoop::VisitCXXForRangeStmt(CXXForRangeStmt const* forStmt) .Namespace("star") .Namespace("sun") .Namespace("com") - .GlobalNamespace()) + .GlobalNamespace() + // B2DPolyPolygon is similar in that accessing the non-const begin()/end() methods + // might trigger unnecessary copying + && !tc.Class("B2DPolyPolygon").Namespace("basegfx").GlobalNamespace()) return true; const VarDecl* varDecl = forStmt->getLoopVariable(); auto tc2 = loplugin::TypeCheck(varDecl->getType()); |