Ignore:
Timestamp:
Aug 22, 2016, 3:31:54 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
dadc1b5, f87408e
Parents:
03b812d2 (diff), 2acf5fc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    r03b812d2 rbd9f8be  
    1010// Created On       : Sat May 16 13:17:07 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug 16 00:09:20 2016
    13 // Update Count     : 495
     12// Last Modified On : Sun Aug 21 09:43:31 2016
     13// Update Count     : 501
    1414//
    1515
     
    120120        } // if
    121121
    122         return new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[Unsigned][size] ), str ) );
     122        Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[Unsigned][size] ), str ) );
     123        delete &str;                                                                            // created by lex
     124        return ret;
    123125} // build_constantInteger
    124126
     
    150152        } // if
    151153
    152         return new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[complx][size] ), str ) );
     154        Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[complx][size] ), str ) );
     155        delete &str;                                                                            // created by lex
     156        return ret;
    153157} // build_constantFloat
    154158
    155159Expression *build_constantChar( const std::string & str ) {
    156         return new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::Char ), str ) );
     160        Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::Char ), str ) );
     161        delete &str;                                                                            // created by lex
     162        return ret;
    157163} // build_constantChar
    158164
     
    163169                                                                                        toString( str.size()+1-2 ) ) ),  // +1 for '\0' and -2 for '"'
    164170                                                                   false, false );
    165         return new ConstantExpr( Constant( at, str ) );
     171        ConstantExpr * ret = new ConstantExpr( Constant( at, str ) );
     172        delete &str;                                                                            // created by lex
     173        return ret;
    166174} // build_constantStr
    167175
Note: See TracChangeset for help on using the changeset viewer.