Changeset a16764a6 for src/Parser/TypeData.cc
- Timestamp:
- Feb 28, 2018, 4:48:22 PM (6 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r6a8df56 ra16764a6 519 519 520 520 static string genTSError( string msg, DeclarationNode::BasicType basictype ) { 521 throwSemanticError( yylloc, string( "invalid type specifier \"" ) + msg + "\" for type \"" + DeclarationNode::basicTypeNames[basictype] + "\"." );521 SemanticError( yylloc, string( "invalid type specifier \"" ) + msg + "\" for type \"" + DeclarationNode::basicTypeNames[basictype] + "\"." ); 522 522 } // genTSError 523 523 … … 919 919 // type set => parameter name already transformed by a declaration names so there is a duplicate 920 920 // declaration name attempting a second transformation 921 if ( param->type ) throwSemanticError( param->location, string( "duplicate declaration name " ) + *param->name );921 if ( param->type ) SemanticError( param->location, string( "duplicate declaration name " ) + *param->name ); 922 922 // declaration type reset => declaration already transformed by a parameter name so there is a duplicate 923 923 // parameter name attempting a second transformation 924 if ( ! decl->type ) throwSemanticError( param->location, string( "duplicate parameter name " ) + *param->name );924 if ( ! decl->type ) SemanticError( param->location, string( "duplicate parameter name " ) + *param->name ); 925 925 param->type = decl->type; // set copy declaration type to parameter type 926 926 decl->type = nullptr; // reset declaration type … … 929 929 } // for 930 930 // declaration type still set => type not moved to a matching parameter so there is a missing parameter name 931 if ( decl->type ) throwSemanticError( 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 ); 932 932 } // for 933 933
Note: See TracChangeset
for help on using the changeset viewer.