Changes in / [8804701:0c92c9f]


Ignore:
Location:
src/SymTab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/FixFunction.cc

    r8804701 r0c92c9f  
    2525
    2626        DeclarationWithType * FixFunction::mutate(FunctionDecl *functionDecl) {
    27                 ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClass(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type()->clone() ), 0, functionDecl->get_attributes() );
    28                 functionDecl->get_attributes().clear();
     27                ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClass(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type()->clone() ), 0 );
    2928                delete functionDecl;
    3029                return pointer;
  • src/SymTab/Validate.cc

    r8804701 r0c92c9f  
    637637                if ( FunctionType *funtype = dynamic_cast<FunctionType *>( ret->get_type() ) ) {
    638638                        // replace the current object declaration with a function declaration
    639                         FunctionDecl * newDecl = new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn(), objDecl->get_attributes() );
    640                         objDecl->get_attributes().clear();
    641                         delete objDecl;
    642                         return newDecl;
     639                        return new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn() );
    643640                } else if ( objDecl->get_isInline() || objDecl->get_isNoreturn() ) {
    644641                        throw SemanticError( "invalid inline or _Noreturn specification in declaration of ", objDecl );
Note: See TracChangeset for help on using the changeset viewer.