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

Stephan Bergmann sbergman at redhat.com
Mon Nov 21 22:05:39 UTC 2016


 compilerplugins/clang/datamembershadow.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 883024d657fb45c7da459017d2f936aac5644bfb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Nov 21 23:02:04 2016 +0100

    FieldDecl::getParent fires assert for Objective C @interface members
    
    (like in vcl/inc/osx/a11ywrapper.h's AquaA11yWrapper), at least on recent Clang
    trunk, from within the call to cast() in
    
      cast<RecordDecl>(getDeclContext())
    
    as the decl context apparently is something other than a RecordDecl.
    
    Change-Id: I238bae44d6db0f04bf8f90b0032489e3b4822eee

diff --git a/compilerplugins/clang/datamembershadow.cxx b/compilerplugins/clang/datamembershadow.cxx
index a1d4528..96f658c 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -96,7 +96,7 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * fieldDecl)
     if (aFileName == SRCDIR "/xmloff/source/draw/ximplink.hxx")
         return true;
 
-    const CXXRecordDecl* parentCXXRecordDecl = dyn_cast<CXXRecordDecl>(fieldDecl->getParent());
+    const CXXRecordDecl* parentCXXRecordDecl = dyn_cast<CXXRecordDecl>(fieldDecl->getDeclContext());
     if (!parentCXXRecordDecl) {
         return true;
     }


More information about the Libreoffice-commits mailing list