Changeset 064cb18 for src/GenPoly/Box.cc


Ignore:
Timestamp:
Feb 3, 2017, 4:02:13 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
dbe8f244
Parents:
a9fc180
git-author:
Rob Schluntz <rschlunt@…> (02/03/17 15:56:16)
git-committer:
Rob Schluntz <rschlunt@…> (02/03/17 16:02:13)
Message:

Fixed code gen for default argument functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    ra9fc180 r064cb18  
    13071307                                }
    13081308                        }
     1309                        // errors should have been caught by this point, remove initializers from parameters to allow correct codegen of default arguments
     1310                        for ( Declaration * param : functionDecl->get_functionType()->get_parameters() ) {
     1311                                if ( ObjectDecl * obj = dynamic_cast< ObjectDecl * >( param ) ) {
     1312                                        delete obj->get_init();
     1313                                        obj->set_init( nullptr );
     1314                                }
     1315                        }
    13091316                        return functionDecl;
    13101317                }
Note: See TracChangeset for help on using the changeset viewer.