summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-21 23:02:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-21 23:02:04 +0100
commit883024d657fb45c7da459017d2f936aac5644bfb (patch)
treef2cfa7ec2cced9358b1dc693c0813f3a54d8ae1a /compilerplugins
parent8846cc2218091aa2af8ee3aadd81fd8a80e3b303 (diff)
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
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/datamembershadow.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/datamembershadow.cxx b/compilerplugins/clang/datamembershadow.cxx
index a1d4528a2058..96f658c2c970 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;
}