Changes in src/Parser/DeclarationNode.cc [c38ae92:f0ecf9b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
rc38ae92 rf0ecf9b 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Nov 20 09:21:52201713 // Update Count : 10 3112 // Last Modified On : Sat Sep 23 18:16:48 2017 13 // Update Count : 1024 14 14 // 15 15 … … 509 509 510 510 DeclarationNode * DeclarationNode::addQualifiers( DeclarationNode * q ) { 511 if ( ! q ) { delete q; return this; } // empty qualifier511 if ( ! q ) { delete q; return this; } 512 512 513 513 checkSpecifiers( q ); 514 514 copySpecifiers( q ); 515 515 516 if ( ! q->type ) { delete q; return this; } 516 if ( ! q->type ) { 517 delete q; 518 return this; 519 } // if 517 520 518 521 if ( ! type ) { 519 type = q->type; // reuse structure522 type = q->type; // reuse this structure 520 523 q->type = nullptr; 521 524 delete q; … … 523 526 } // if 524 527 525 if ( q->type->forall ) { // forall qualifier ?526 if ( type->forall ) { // polymorphic routine ?527 type->forall->appendList( q->type->forall ); // augment forall qualifier528 if ( q->type->forall ) { 529 if ( type->forall ) { 530 type->forall->appendList( q->type->forall ); 528 531 } else { 529 if ( type->kind == TypeData::Aggregate ) { // struct/union ? 530 if ( type->aggregate.params ) { // polymorphic ? 531 type->aggregate.params->appendList( q->type->forall ); // augment forall qualifier 532 } else { // not polymorphic 533 type->aggregate.params = q->type->forall; // make polymorphic type 534 // change implicit typedef from TYPEDEFname to TYPEGENname 535 typedefTable.changeKind( *type->aggregate.name, TypedefTable::TG ); 536 } // if 537 } else { // not polymorphic 538 type->forall = q->type->forall; // make polymorphic routine 532 if ( type->kind == TypeData::Aggregate ) { 533 type->aggregate.params = q->type->forall; 534 // change implicit typedef from TYPEDEFname to TYPEGENname 535 typedefTable.changeKind( *type->aggregate.name, TypedefTable::TG ); 536 } else { 537 type->forall = q->type->forall; 539 538 } // if 540 539 } // if 541 q->type->forall = nullptr; // forall qualifier moved540 q->type->forall = nullptr; 542 541 } // if 543 542
Note: See TracChangeset
for help on using the changeset viewer.