diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-08-14 16:05:07 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-08-22 07:13:58 +0200 |
commit | 4ef1f4ae499cbac7e85b03abff5c2bb31c68b90f (patch) | |
tree | feb08d1b1ded93bbb84bbaa5263b69a1be0c30ea /idlc/source | |
parent | d239ee4fa43c3936aceff343085bd2c74c25605c (diff) |
downcast of address which does not point to an object of type 'AstInterface'
(note: object is of type 'AstTypeDef'); Clang -fsanitize=undefined
Change-Id: I1b11a7678f18557c8040af2118c1c0101913f086
Diffstat (limited to 'idlc/source')
-rw-r--r-- | idlc/source/aststruct.cxx | 4 | ||||
-rw-r--r-- | idlc/source/parser.y | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx index fff256acc338..d60026a22b24 100644 --- a/idlc/source/aststruct.cxx +++ b/idlc/source/aststruct.cxx @@ -27,7 +27,7 @@ using namespace ::rtl; AstStruct::AstStruct( const OString& name, std::vector< OString > const & typeParameters, - AstStruct* pBaseType, AstScope* pScope) + AstStruct const* pBaseType, AstScope* pScope) : AstType(NT_struct, name, pScope) , AstScope(NT_struct) , m_pBaseType(pBaseType) @@ -42,7 +42,7 @@ AstStruct::AstStruct( AstStruct::AstStruct(const NodeType type, const OString& name, - AstStruct* pBaseType, + AstStruct const* pBaseType, AstScope* pScope) : AstType(type, name, pScope) , AstScope(type) diff --git a/idlc/source/parser.y b/idlc/source/parser.y index 7bfdea21e380..c149219af96e 100644 --- a/idlc/source/parser.y +++ b/idlc/source/parser.y @@ -582,7 +582,7 @@ interface_dcl : { pInterface = new AstInterface( *$1->getName(), - static_cast< AstInterface * >($1->getInherits()), pScope); + static_cast< AstInterface const * >(resolveTypedefs($1->getInherits())), pScope); if ( pInterface && (pDecl = pScope->lookupByName(pInterface->getScopedName())) ) { @@ -2586,7 +2586,7 @@ struct_type : if ( pScope ) { - AstStruct* pBase= static_cast< AstStruct* >($1->getInherits()); + AstStruct const* pBase= static_cast< AstStruct const* >(resolveTypedefs($1->getInherits())); pStruct = new AstStruct( *$1->getName(), $1->getTypeParameters(), pBase, pScope); pScope->addDeclaration(pStruct); |