Changeset 2037f82


Ignore:
Timestamp:
Aug 19, 2016, 2:33:04 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
4a7d895, 4f147cc
Parents:
ac71a86
Message:

added many missing calls to delete, still a long way to go...

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rac71a86 r2037f82  
    776776                } // if
    777777        } // if
     778        delete o;
    778779        return o;
    779780}
  • src/Parser/parser.cc

    rac71a86 r2037f82  
    70957095  case 554:
    70967096#line 2139 "parser.yy" /* yacc.c:1646  */
    7097     {}
     7097    { delete (yyvsp[0].tok); }
    70987098#line 7099 "Parser/parser.cc" /* yacc.c:1646  */
    70997099    break;
     
    71017101  case 555:
    71027102#line 2140 "parser.yy" /* yacc.c:1646  */
    7103     {}
     7103    { delete (yyvsp[0].decl); }
    71047104#line 7105 "Parser/parser.cc" /* yacc.c:1646  */
    71057105    break;
     
    71077107  case 556:
    71087108#line 2141 "parser.yy" /* yacc.c:1646  */
    7109     {}
     7109    { delete (yyvsp[0].decl); }
    71107110#line 7111 "Parser/parser.cc" /* yacc.c:1646  */
    71117111    break;
     
    71137113  case 557:
    71147114#line 2142 "parser.yy" /* yacc.c:1646  */
    7115     {}
     7115    { delete (yyvsp[0].decl); }
    71167116#line 7117 "Parser/parser.cc" /* yacc.c:1646  */
    71177117    break;
  • src/Parser/parser.yy

    rac71a86 r2037f82  
    21372137
    21382138any_word:                                                                                               // GCC
    2139         identifier_or_type_name {}
    2140         | storage_class {}
    2141         | basic_type_name {}
    2142         | type_qualifier {}
     2139        identifier_or_type_name { delete $1; }
     2140        | storage_class { delete $1; }
     2141        | basic_type_name { delete $1; }
     2142        | type_qualifier { delete $1; }
    21432143        ;
    21442144
  • src/SynTree/FunctionDecl.cc

    rac71a86 r2037f82  
    3939        delete type;
    4040        delete statements;
     41        deleteAll( oldDecls );
    4142}
    4243
  • src/SynTree/Statement.cc

    rac71a86 r2037f82  
    159159        delete condition;
    160160        // destroy statements
     161        deleteAll( statements );
    161162}
    162163
     
    187188CaseStmt::~CaseStmt() {
    188189        delete condition;
     190        deleteAll( stmts );
    189191}
    190192
     
    220222WhileStmt::~WhileStmt() {
    221223        delete body;
     224        delete condition;
    222225}
    223226
     
    294297TryStmt::~TryStmt() {
    295298        delete block;
     299        deleteAll( handlers );
     300        delete finallyBlock;
    296301}
    297302
Note: See TracChangeset for help on using the changeset viewer.