diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-30 14:53:59 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-30 14:55:35 +0100 |
commit | 0555447cd09fa2851e51cd63543ebc7db0a72a1a (patch) | |
tree | 33aa6a26daa8196af7534de8cbc6adcefa195029 /idlc | |
parent | 686611019fee67e130452ad0b4abe50647d948fb (diff) |
FD_complex is unused
...since 8e71d9400bd350d63723c5489ddaadb3d3610baf "Remove UNOIDL 'array' and
'union' vaporware from idlc"
Change-Id: Id4cdef900667cdac466a41e47c189e2d25a62065
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/inc/idlc/fehelper.hxx | 13 | ||||
-rw-r--r-- | idlc/source/fehelper.cxx | 14 | ||||
-rw-r--r-- | idlc/source/parser.y | 12 |
3 files changed, 11 insertions, 28 deletions
diff --git a/idlc/inc/idlc/fehelper.hxx b/idlc/inc/idlc/fehelper.hxx index 62566483435a..1af64561a128 100644 --- a/idlc/inc/idlc/fehelper.hxx +++ b/idlc/inc/idlc/fehelper.hxx @@ -27,23 +27,14 @@ class FeDeclarator { public: - // Enum to denote types of declarators - enum DeclaratorType - { - FD_simple, // Simple declarator - FD_complex // Complex declarator (complex_part field used) - }; - - FeDeclarator(const OString& name, DeclaratorType declType, AstDeclaration* pComplPart); + FeDeclarator(const OString& name); virtual ~FeDeclarator(); const OString& getName() { return m_name; } bool checkType(AstDeclaration const * pType); - AstType const * compose(AstDeclaration const * pDecl); + static AstType const * compose(AstDeclaration const * pDecl); private: - AstDeclaration* m_pComplexPart; OString m_name; - DeclaratorType m_declType; }; typedef ::std::list< FeDeclarator* > FeDeclList; diff --git a/idlc/source/fehelper.cxx b/idlc/source/fehelper.cxx index 4e4c549dc5b0..704c9539c2a1 100644 --- a/idlc/source/fehelper.cxx +++ b/idlc/source/fehelper.cxx @@ -21,10 +21,8 @@ #include <idlc/errorhandler.hxx> #include "idlc/idlc.hxx" -FeDeclarator::FeDeclarator(const OString& name, DeclaratorType declType, AstDeclaration* pComplPart) - : m_pComplexPart(pComplPart) - , m_name(name) - , m_declType(declType) +FeDeclarator::FeDeclarator(const OString& name) + : m_name(name) { } @@ -47,8 +45,6 @@ bool FeDeclarator::checkType(AstDeclaration const * type) AstType const * FeDeclarator::compose(AstDeclaration const * pDecl) { - const AstType* pType; - if ( pDecl == nullptr ) { return nullptr; @@ -58,11 +54,7 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl) ErrorHandler::noTypeError(pDecl); return nullptr; } - pType = static_cast<const AstType*>(pDecl); - if (m_declType == FD_simple || m_pComplexPart == nullptr) - return pType; - - return nullptr; // return through this statement should not happen + return static_cast<const AstType*>(pDecl); } FeInheritanceHeader::FeInheritanceHeader( diff --git a/idlc/source/parser.y b/idlc/source/parser.y index c449aa7e6bcc..8296ac46b926 100644 --- a/idlc/source/parser.y +++ b/idlc/source/parser.y @@ -733,7 +733,7 @@ attribute : AstInterface * scope = static_cast< AstInterface * >( idlc()->scopes()->top()); AstAttribute * attr = new AstAttribute( - $1, $4->compose($2), $4->getName(), scope); + $1, FeDeclarator::compose($2), $4->getName(), scope); delete $4; AstInterface::DoubleMemberDeclarations doubleMembers( scope->checkMemberClashes(attr)); @@ -1053,7 +1053,7 @@ parameter : */ if ( pScope && $5 && $8 ) { - AstType const * pType = $8->compose($5); + AstType const * pType = FeDeclarator::compose($5); if ( pType ) { if (pScope->isConstructor() && $2 != DIR_IN) { @@ -1570,7 +1570,7 @@ property : continue; } - pType = pDecl->compose($2); + pType = FeDeclarator::compose($2); if ( !pType ) { @@ -2047,7 +2047,7 @@ type_declarator : continue; } - pType = pDecl->compose($1); + pType = FeDeclarator::compose($1); if ( !pType ) { @@ -2122,7 +2122,7 @@ declarator : checkIdentifier($1); } - $$ = new FeDeclarator(*$1, FeDeclarator::FD_simple, NULL); + $$ = new FeDeclarator(*$1); delete $1; } ; @@ -2556,7 +2556,7 @@ member : continue; } - pType = pDecl->compose($1); + pType = FeDeclarator::compose($1); if ( !pType ) { |