Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/ExceptTranslate.cc

    r8f6dfe7 rd180746  
    1010// Created On       : Wed Jun 14 16:49:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Aug 17 17:19:00 2017
    13 // Update Count     : 9
     12// Last Modified On : Tus Aug  8 16:54:00 2017
     13// Update Count     : 7
    1414//
    1515
     
    166166                        /*bitfieldWidth*/ NULL,
    167167                        new BasicType( noQualifiers, BasicType::Bool ),
    168                         /*init*/ NULL,
    169                         std::list<Attribute *>{ new Attribute( "unused" ) }
     168                        /*init*/ NULL
    170169                        );
    171170                ObjectDecl voidptr_obj(
     
    184183                        );
    185184
    186                 ObjectDecl * unused_index_obj = index_obj.clone();
    187                 unused_index_obj->attributes.push_back( new Attribute( "unused" ) );
    188 
    189185                catch_func_t.get_parameters().push_back( index_obj.clone() );
    190186                catch_func_t.get_parameters().push_back( exception_obj.clone() );
    191                 match_func_t.get_returnVals().push_back( unused_index_obj );
     187                match_func_t.get_returnVals().push_back( index_obj.clone() );
    192188                match_func_t.get_parameters().push_back( exception_obj.clone() );
    193189                handle_func_t.get_returnVals().push_back( bool_obj.clone() );
     
    421417                }
    422418
    423                 body->push_back( new ReturnStmt( noLabels,
    424                         new ConstantExpr( Constant::from_int( 0 ) ) ) );
     419                body->push_back( new ReturnStmt( noLabels, new ConstantExpr(
     420                        Constant::from_int( 0 ) ) ) );
    425421
    426422                return new FunctionDecl("match", Type::StorageClasses(),
     
    453449                CompoundStmt * body = new CompoundStmt( noLabels );
    454450
    455                 FunctionType * func_type = handle_func_t.clone();
     451                FunctionType * func_type = match_func_t.clone();
    456452                DeclarationWithType * except_obj = func_type->get_parameters().back();
    457453
     
    476472                }
    477473
    478                 body->push_back( new ReturnStmt( noLabels,
    479                         new ConstantExpr( Constant::from_bool( false ) ) ) );
     474                body->push_back( new ReturnStmt( noLabels, new ConstantExpr(
     475                        Constant::from_bool( false ) ) ) );
    480476
    481477                return new FunctionDecl("handle", Type::StorageClasses(),
Note: See TracChangeset for help on using the changeset viewer.