Kaydet (Commit) 0555447c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

FD_complex is unused

...since 8e71d940 "Remove UNOIDL 'array' and
'union' vaporware from idlc"

Change-Id: Id4cdef900667cdac466a41e47c189e2d25a62065
üst 68661101
...@@ -27,23 +27,14 @@ ...@@ -27,23 +27,14 @@
class FeDeclarator class FeDeclarator
{ {
public: public:
// Enum to denote types of declarators FeDeclarator(const OString& name);
enum DeclaratorType
{
FD_simple, // Simple declarator
FD_complex // Complex declarator (complex_part field used)
};
FeDeclarator(const OString& name, DeclaratorType declType, AstDeclaration* pComplPart);
virtual ~FeDeclarator(); virtual ~FeDeclarator();
const OString& getName() const OString& getName()
{ return m_name; } { return m_name; }
bool checkType(AstDeclaration const * pType); bool checkType(AstDeclaration const * pType);
AstType const * compose(AstDeclaration const * pDecl); static AstType const * compose(AstDeclaration const * pDecl);
private: private:
AstDeclaration* m_pComplexPart;
OString m_name; OString m_name;
DeclaratorType m_declType;
}; };
typedef ::std::list< FeDeclarator* > FeDeclList; typedef ::std::list< FeDeclarator* > FeDeclList;
......
...@@ -21,10 +21,8 @@ ...@@ -21,10 +21,8 @@
#include <idlc/errorhandler.hxx> #include <idlc/errorhandler.hxx>
#include "idlc/idlc.hxx" #include "idlc/idlc.hxx"
FeDeclarator::FeDeclarator(const OString& name, DeclaratorType declType, AstDeclaration* pComplPart) FeDeclarator::FeDeclarator(const OString& name)
: m_pComplexPart(pComplPart) : m_name(name)
, m_name(name)
, m_declType(declType)
{ {
} }
...@@ -47,8 +45,6 @@ bool FeDeclarator::checkType(AstDeclaration const * type) ...@@ -47,8 +45,6 @@ bool FeDeclarator::checkType(AstDeclaration const * type)
AstType const * FeDeclarator::compose(AstDeclaration const * pDecl) AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
{ {
const AstType* pType;
if ( pDecl == nullptr ) if ( pDecl == nullptr )
{ {
return nullptr; return nullptr;
...@@ -58,11 +54,7 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl) ...@@ -58,11 +54,7 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
ErrorHandler::noTypeError(pDecl); ErrorHandler::noTypeError(pDecl);
return nullptr; return nullptr;
} }
pType = static_cast<const AstType*>(pDecl); return static_cast<const AstType*>(pDecl);
if (m_declType == FD_simple || m_pComplexPart == nullptr)
return pType;
return nullptr; // return through this statement should not happen
} }
FeInheritanceHeader::FeInheritanceHeader( FeInheritanceHeader::FeInheritanceHeader(
......
...@@ -733,7 +733,7 @@ attribute : ...@@ -733,7 +733,7 @@ attribute :
AstInterface * scope = static_cast< AstInterface * >( AstInterface * scope = static_cast< AstInterface * >(
idlc()->scopes()->top()); idlc()->scopes()->top());
AstAttribute * attr = new AstAttribute( AstAttribute * attr = new AstAttribute(
$1, $4->compose($2), $4->getName(), scope); $1, FeDeclarator::compose($2), $4->getName(), scope);
delete $4; delete $4;
AstInterface::DoubleMemberDeclarations doubleMembers( AstInterface::DoubleMemberDeclarations doubleMembers(
scope->checkMemberClashes(attr)); scope->checkMemberClashes(attr));
...@@ -1053,7 +1053,7 @@ parameter : ...@@ -1053,7 +1053,7 @@ parameter :
*/ */
if ( pScope && $5 && $8 ) if ( pScope && $5 && $8 )
{ {
AstType const * pType = $8->compose($5); AstType const * pType = FeDeclarator::compose($5);
if ( pType ) if ( pType )
{ {
if (pScope->isConstructor() && $2 != DIR_IN) { if (pScope->isConstructor() && $2 != DIR_IN) {
...@@ -1570,7 +1570,7 @@ property : ...@@ -1570,7 +1570,7 @@ property :
continue; continue;
} }
pType = pDecl->compose($2); pType = FeDeclarator::compose($2);
if ( !pType ) if ( !pType )
{ {
...@@ -2047,7 +2047,7 @@ type_declarator : ...@@ -2047,7 +2047,7 @@ type_declarator :
continue; continue;
} }
pType = pDecl->compose($1); pType = FeDeclarator::compose($1);
if ( !pType ) if ( !pType )
{ {
...@@ -2122,7 +2122,7 @@ declarator : ...@@ -2122,7 +2122,7 @@ declarator :
checkIdentifier($1); checkIdentifier($1);
} }
$$ = new FeDeclarator(*$1, FeDeclarator::FD_simple, NULL); $$ = new FeDeclarator(*$1);
delete $1; delete $1;
} }
; ;
...@@ -2556,7 +2556,7 @@ member : ...@@ -2556,7 +2556,7 @@ member :
continue; continue;
} }
pType = pDecl->compose($1); pType = FeDeclarator::compose($1);
if ( !pType ) if ( !pType )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment