Changeset 01b9928


Ignore:
Timestamp:
May 26, 2017, 6:45:37 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
38bfe05b
Parents:
67cf18c
Message:

permit empty initializer lists [fixes #12]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r67cf18c r01b9928  
    324324                printDesignators( init->get_designators() );
    325325                output << "{ ";
    326                 if ( init->begin() == init->end() ) {
    327                         // illegal to leave initializer list empty for scalar initializers, but always legal to have 0
    328                         output << "0";
    329                 } else {
    330                         genCommaList( init->begin(), init->end() );
    331                 } // if
     326                genCommaList( init->begin(), init->end() );
    332327                output << " }";
    333328        }
Note: See TracChangeset for help on using the changeset viewer.