Changeset 01b9928


Ignore:
Timestamp:
May 26, 2017, 6:45:37 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:
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.