[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 20 21:43:14 UTC 2020


 compilerplugins/clang/plugin.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 4c11b51b349c2ad8e9019b4a84299e0cfd21b357
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Feb 20 21:04:11 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Feb 20 22:42:38 2020 +0100

    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<class com::sun::star::accessibility::XAccessible>' lvalue
    > `-CXXBindTemporaryExpr 0x7fdff3111340 'const a11yref':'const class com::sun::star::uno::Reference<class com::sun::star::accessibility::XAccessible>' (CXXTemporary 0x7fdff3111340)
    >   `-CXXConstructExpr 0x7fdff3111308 'const a11yref':'const class com::sun::star::uno::Reference<class com::sun::star::accessibility::XAccessible>' 'void (class com::sun::star::accessibility::XAccessible *)'
    >     `-ImplicitCastExpr 0x7fdff31112f0 'class com::sun::star::accessibility::XAccessible *' <NullToPointer>
    >       `-CXXNullPtrLiteralExpr 0x7fdff31112b0 'nullptr_t'
    > MaterializeTemporaryExpr 0x7fdff39275d8 'const a11yref':'const class com::sun::star::uno::Reference<class com::sun::star::accessibility::XAccessible>' lvalue
    > `-CXXBindTemporaryExpr 0x7fdff39275b8 'const a11yref':'const class com::sun::star::uno::Reference<class com::sun::star::accessibility::XAccessible>' (CXXTemporary 0x7fdff39275b8)
    >   `-CXXConstructExpr 0x7fdff3927580 'const a11yref':'const class com::sun::star::uno::Reference<class com::sun::star::accessibility::XAccessible>' 'void (class com::sun::star::accessibility::XAccessible *)'
    >     `-ImplicitCastExpr 0x7fdff3927568 'class com::sun::star::accessibility::XAccessible *' <NullToPointer>
    >       `-CXXNullPtrLiteralExpr 0x7fdff3927528 'nullptr_t'
    
    Change-Id: I2603180571df2248d4697ba63e1a8391d0dfc596
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89157
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

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


More information about the Libreoffice-commits mailing list