Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/FunctionDecl.cc

    rf9cebb5 r7baed7d  
    2323
    2424FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, std::list< Attribute * > attributes )
    25                 : Parent( name, sc, linkage, attributes ), type( type ), statements( statements ) {
     25                : Parent( name, sc, linkage ), type( type ), statements( statements ), attributes( attributes ) {
    2626        set_isInline( isInline );
    2727        set_isNoreturn( isNoreturn );
     
    3434FunctionDecl::FunctionDecl( const FunctionDecl &other )
    3535        : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {
     36                cloneAll( other.attributes, attributes );
    3637}
    3738
     
    3940        delete type;
    4041        delete statements;
     42        deleteAll( attributes );
    4143}
    4244
     
    6769        } // if
    6870
    69         printAll( get_attributes(), os, indent );
     71        printAll( attributes, os, indent );
    7072
    7173        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
Note: See TracChangeset for help on using the changeset viewer.