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 @@
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;
......
......@@ -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(
......
......@@ -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 )
{
......
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