Ignore:
Timestamp:
Aug 24, 2016, 1:55:39 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, 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, resolv-new, with_gc
Children:
3906301, 4e2b971, 60aa49a7, a2a8d2a6
Parents:
0555f4b
Message:

add option to CodeGen? to output unmangled name, add ctorWarnings test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r0555f4b r486341f  
    735735                        for ( DeclarationWithType * member : unhandled ) {
    736736                                // emit a warning for each unhandled member
    737                                 warn( "in ", CodeGen::genType( function->get_functionType(), function->get_name() ), ", member ", member->get_name(), " may not have been ", isConstructor( funcDecl->get_name() ) ? "constructed" : "destructed" );
     737                                warn( "in ", CodeGen::genType( function->get_functionType(), function->get_name(), false ), ", member ", member->get_name(), " may not have been ", isConstructor( funcDecl->get_name() ) ? "constructed" : "destructed" );
    738738                        }
    739739
     
    789789                void WarnStructMembers::visit( MemberExpr * memberExpr ) {
    790790                        if ( ! checkWarnings( function ) ) return;
    791                         if ( ! isConstructor( function->get_name() ) );
     791                        if ( ! isConstructor( function->get_name() ) ) return;
    792792
    793793                        if ( ApplicationExpr * deref = dynamic_cast< ApplicationExpr * >( memberExpr->get_aggregate() ) ) {
     
    797797                                                        if ( unhandled.count( memberExpr->get_member() ) ) {
    798798                                                                // emit a warning because a member was used before it was constructed
    799                                                                 warn( "in ", CodeGen::genType( function->get_functionType(), function->get_name() ), ", member ", memberExpr->get_member()->get_name(), " used before being constructed" );
     799                                                                warn( "in ", CodeGen::genType( function->get_functionType(), function->get_name(), false ), ", member ", memberExpr->get_member()->get_name(), " used before being constructed" );
    800800                                                        }
    801801                                                }
Note: See TracChangeset for help on using the changeset viewer.