Ignore:
Timestamp:
Feb 28, 2018, 4:48:22 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
446ffa3
Parents:
6a8df56
Message:

Changed warning system to prepare for toggling warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    r6a8df56 ra16764a6  
    519519
    520520static string genTSError( string msg, DeclarationNode::BasicType basictype ) {
    521         throw SemanticError( yylloc, string( "invalid type specifier \"" ) + msg + "\" for type \"" + DeclarationNode::basicTypeNames[basictype] + "\"." );
     521        SemanticError( yylloc, string( "invalid type specifier \"" ) + msg + "\" for type \"" + DeclarationNode::basicTypeNames[basictype] + "\"." );
    522522} // genTSError
    523523
     
    919919                                // type set => parameter name already transformed by a declaration names so there is a duplicate
    920920                                // declaration name attempting a second transformation
    921                                 if ( param->type ) throw SemanticError( param->location, string( "duplicate declaration name " ) + *param->name );
     921                                if ( param->type ) SemanticError( param->location, string( "duplicate declaration name " ) + *param->name );
    922922                                // declaration type reset => declaration already transformed by a parameter name so there is a duplicate
    923923                                // parameter name attempting a second transformation
    924                                 if ( ! decl->type ) throw SemanticError( param->location, string( "duplicate parameter name " ) + *param->name );
     924                                if ( ! decl->type ) SemanticError( param->location, string( "duplicate parameter name " ) + *param->name );
    925925                                param->type = decl->type;                               // set copy declaration type to parameter type
    926926                                decl->type = nullptr;                                   // reset declaration type
     
    929929                } // for
    930930                // declaration type still set => type not moved to a matching parameter so there is a missing parameter name
    931                 if ( decl->type ) throw SemanticError( decl->location, string( "missing name in parameter list " ) + *decl->name );
     931                if ( decl->type ) SemanticError( decl->location, string( "missing name in parameter list " ) + *decl->name );
    932932        } // for
    933933
Note: See TracChangeset for help on using the changeset viewer.