compilerplugins/clang/staticmethods.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 73064240850c78e93ee6c534a388aba617e4c234 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Mon May 27 07:37:32 2024 +0200 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Mon May 27 09:40:00 2024 +0200 False loplugin:staticmethods with LLVM 19 trunk > In file included from libreofficekit/source/gtk/lokdocview.cxx:26: > In file included from include/vcl/event.hxx:28: > In file included from include/vcl/outdev.hxx:30: > In file included from include/vcl/bitmap.hxx:31: > In file included from include/vcl/region.hxx:26: > In file included from include/basegfx/polygon/b2dpolypolygon.hxx:27: > In file included from include/basegfx/range/b2drange.hxx:27: > In file included from include/basegfx/point/b2dpoint.hxx:27: > include/basegfx/tuple/Size2D.hxx:30:10: error: this member function can be declared static [loplugin:staticmethods] > 30 | TYPE getWidth() const { return Tuple2D<TYPE>::getX(); } > | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/basegfx/tuple/Size2D.hxx:32:10: error: this member function can be declared static [loplugin:staticmethods] > 32 | TYPE getHeight() const { return Tuple2D<TYPE>::getY(); } > | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/basegfx/tuple/Size2D.hxx:34:10: error: this member function can be declared static [loplugin:staticmethods] > 34 | void setWidth(TYPE const& rWidth) { Tuple2D<TYPE>::setX(rWidth); } > | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/basegfx/tuple/Size2D.hxx:36:10: error: this member function can be declared static [loplugin:staticmethods] > 36 | void setHeight(TYPE const& rHeight) { Tuple2D<TYPE>::setY(rHeight); } > | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...but no idea why exactly that started to hit me just now Change-Id: Ibb2b57b54b07461a50375ee64670ff21e4670b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx index ebe91520a7d5..214c26cdd449 100644 --- a/compilerplugins/clang/staticmethods.cxx +++ b/compilerplugins/clang/staticmethods.cxx @@ -33,9 +33,10 @@ public: bool TraverseCXXMethodDecl(const CXXMethodDecl * decl); bool VisitCXXThisExpr(const CXXThisExpr *) { bVisitedThis = true; return true; } - // these two indicate that we hit something that makes our analysis unreliable + // these three indicate that we hit something that makes our analysis unreliable bool VisitUnresolvedMemberExpr(const UnresolvedMemberExpr *) { bVisitedThis = true; return true; } bool VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *) { bVisitedThis = true; return true; } + bool VisitDependentScopeDeclRefExpr(const DependentScopeDeclRefExpr *) { bVisitedThis = true; return true; } private: StringRef getFilename(SourceLocation loc); };