From 4c11b51b349c2ad8e9019b4a84299e0cfd21b357 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 20 Feb 2020 21:04:11 +0100 Subject: Adapt structurallyIdentical to current needs ...since aad94d48b19135a2e46ac7b2c0f41f3bb29bb5a7 "Silence warnings in salvtables.hxx", where --enable-compiler-plugins=debug had started to fail with > In file included from vcl/source/app/salvtables.cxx:75: > vcl/inc/salvtables.hxx:128:69: fatal error: TODO: Unexpected 'IdenticalDefaultArgumentsResult::Maybe' [loplugin:overrideparam] > weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr, > ^~~~~~~ > include/vcl/weld.hxx:2138:69: note: TODO: second argument is here [loplugin:overrideparam] > weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr, > ^~~~~~~ > MaterializeTemporaryExpr 0x7fdff3111360 'const a11yref':'const class com::sun::star::uno::Reference' lvalue > `-CXXBindTemporaryExpr 0x7fdff3111340 'const a11yref':'const class com::sun::star::uno::Reference' (CXXTemporary 0x7fdff3111340) > `-CXXConstructExpr 0x7fdff3111308 'const a11yref':'const class com::sun::star::uno::Reference' 'void (class com::sun::star::accessibility::XAccessible *)' > `-ImplicitCastExpr 0x7fdff31112f0 'class com::sun::star::accessibility::XAccessible *' > `-CXXNullPtrLiteralExpr 0x7fdff31112b0 'nullptr_t' > MaterializeTemporaryExpr 0x7fdff39275d8 'const a11yref':'const class com::sun::star::uno::Reference' lvalue > `-CXXBindTemporaryExpr 0x7fdff39275b8 'const a11yref':'const class com::sun::star::uno::Reference' (CXXTemporary 0x7fdff39275b8) > `-CXXConstructExpr 0x7fdff3927580 'const a11yref':'const class com::sun::star::uno::Reference' 'void (class com::sun::star::accessibility::XAccessible *)' > `-ImplicitCastExpr 0x7fdff3927568 'class com::sun::star::accessibility::XAccessible *' > `-CXXNullPtrLiteralExpr 0x7fdff3927528 'nullptr_t' Change-Id: I2603180571df2248d4697ba63e1a8391d0dfc596 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89157 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- compilerplugins/clang/plugin.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx index 41767369211a..c6591d6b4fd5 100644 --- a/compilerplugins/clang/plugin.cxx +++ b/compilerplugins/clang/plugin.cxx @@ -95,8 +95,11 @@ bool structurallyIdentical(Stmt const * stmt1, Stmt const * stmt2) { } break; case Stmt::MaterializeTemporaryExprClass: + case Stmt::CXXBindTemporaryExprClass: case Stmt::ParenExprClass: break; + case Stmt::CXXNullPtrLiteralExprClass: + return true; default: // Conservatively assume non-identical for expressions that don't happen for us in practice // when compiling the LO code base (and for which the above set of supported classes would -- cgit