Changeset 44adf1b for src/Parser/TypeData.cc
- Timestamp:
- Mar 5, 2024, 9:55:04 AM (7 months ago)
- Branches:
- master
- Children:
- af60383
- Parents:
- 9262fe9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r9262fe9 r44adf1b 494 494 for ( auto i = outputList.begin() ; 495 495 i != outputList.end() ; 496 ++i, n = (DeclarationNode*)n->get_next()) {496 ++i, n = n->next ) { 497 497 // Only the object type class adds additional assertions. 498 498 if ( n->variable.tyClass != ast::TypeDecl::Otype ) { … … 639 639 for ( auto i = outputForall.begin() ; 640 640 i != outputForall.end() ; 641 ++i, n = (DeclarationNode*)n->get_next()) {641 ++i, n = n->next ) { 642 642 // Only the object type class adds additional assertions. 643 643 if ( n->variable.tyClass != ast::TypeDecl::Otype ) { … … 1272 1272 auto members = ret->members.begin(); 1273 1273 ret->hide = td->enumeration.hiding == EnumHiding::Hide ? ast::EnumDecl::EnumHiding::Hide : ast::EnumDecl::EnumHiding::Visible; 1274 for ( const DeclarationNode * cur = td->enumeration.constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {1274 for ( const DeclarationNode * cur = td->enumeration.constants; cur != nullptr; cur = cur->next, ++members ) { 1275 1275 if ( cur->enumInLine ) { 1276 1276 // Do Nothing … … 1500 1500 assert( ! function.params ); 1501 1501 // loop over declaration first as it is easier to spot errors 1502 for ( DeclarationNode * decl = function.oldDeclList; decl != nullptr; decl = d ynamic_cast< DeclarationNode * >( decl->get_next() )) {1502 for ( DeclarationNode * decl = function.oldDeclList; decl != nullptr; decl = decl->next ) { 1503 1503 // scan ALL parameter names for each declaration name to check for duplicates 1504 for ( DeclarationNode * param = function.idList; param != nullptr; param = dynamic_cast< DeclarationNode * >( param->get_next() )) {1504 for ( DeclarationNode * param = function.idList; param != nullptr; param = param->next ) { 1505 1505 if ( *decl->name == *param->name ) { 1506 1506 // type set => parameter name already transformed by a declaration names so there is a duplicate … … 1524 1524 // rtb( a, b, c ) const char * b; {} => int rtn( int a, const char * b, int c ) {} 1525 1525 1526 for ( DeclarationNode * param = function.idList; param != nullptr; param = dynamic_cast< DeclarationNode * >( param->get_next() )) {1526 for ( DeclarationNode * param = function.idList; param != nullptr; param = param->next ) { 1527 1527 if ( ! param->type ) { // generate type int for empty parameter type 1528 1528 param->type = new TypeData( TypeData::Basic );
Note: See TracChangeset
for help on using the changeset viewer.