Changeset 798a8b3
- Timestamp:
- Jun 16, 2021, 2:44:09 PM (4 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7e1cb79
- Parents:
- 1d61b67
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.impl.hpp
r1d61b67 r798a8b3 479 479 guard_symtab guard { *this }; 480 480 // implicit add __func__ identifier as specified in the C manual 6.4.2.2 481 static ast::ptr< ast::ObjectDecl > func{ new ast::ObjectDecl{ 481 static ast::ptr< ast::ObjectDecl > func{ new ast::ObjectDecl{ 482 482 CodeLocation{}, "__func__", 483 483 new ast::ArrayType{ … … 522 522 VISIT({ 523 523 guard_symtab guard { * this }; 524 maybe_accept( node, &StructDecl::params ); 525 maybe_accept( node, &StructDecl::members ); 524 maybe_accept( node, &StructDecl::params ); 525 maybe_accept( node, &StructDecl::members ); 526 maybe_accept( node, &StructDecl::attributes ); 526 527 }) 527 528 … … 543 544 VISIT({ 544 545 guard_symtab guard { * this }; 545 maybe_accept( node, &UnionDecl::params ); 546 maybe_accept( node, &UnionDecl::members ); 546 maybe_accept( node, &UnionDecl::params ); 547 maybe_accept( node, &UnionDecl::members ); 548 maybe_accept( node, &UnionDecl::attributes ); 547 549 }) 548 550 … … 562 564 VISIT( 563 565 // unlike structs, traits, and unions, enums inject their members into the global scope 564 maybe_accept( node, &EnumDecl::params ); 565 maybe_accept( node, &EnumDecl::members ); 566 maybe_accept( node, &EnumDecl::params ); 567 maybe_accept( node, &EnumDecl::members ); 568 maybe_accept( node, &EnumDecl::attributes ); 566 569 ) 567 570 … … 577 580 VISIT({ 578 581 guard_symtab guard { *this }; 579 maybe_accept( node, &TraitDecl::params ); 580 maybe_accept( node, &TraitDecl::members ); 582 maybe_accept( node, &TraitDecl::params ); 583 maybe_accept( node, &TraitDecl::members ); 584 maybe_accept( node, &TraitDecl::attributes ); 581 585 }) 582 586 -
src/Common/PassVisitor.impl.h
r1d61b67 r798a8b3 636 636 maybeAccept_impl( node->parameters, *this ); 637 637 maybeAccept_impl( node->members , *this ); 638 maybeAccept_impl( node->attributes, *this ); 638 639 } 639 640 … … 656 657 maybeAccept_impl( node->parameters, *this ); 657 658 maybeAccept_impl( node->members , *this ); 659 maybeAccept_impl( node->attributes, *this ); 658 660 } 659 661 … … 676 678 maybeMutate_impl( node->parameters, *this ); 677 679 maybeMutate_impl( node->members , *this ); 680 maybeMutate_impl( node->attributes, *this ); 678 681 } 679 682 … … 697 700 maybeAccept_impl( node->parameters, *this ); 698 701 maybeAccept_impl( node->members , *this ); 702 maybeAccept_impl( node->attributes, *this ); 699 703 } 700 704 … … 714 718 maybeAccept_impl( node->parameters, *this ); 715 719 maybeAccept_impl( node->members , *this ); 720 maybeAccept_impl( node->attributes, *this ); 716 721 } 717 722 … … 732 737 maybeMutate_impl( node->parameters, *this ); 733 738 maybeMutate_impl( node->members , *this ); 739 maybeMutate_impl( node->attributes, *this ); 734 740 } 735 741 … … 750 756 maybeAccept_impl( node->parameters, *this ); 751 757 maybeAccept_impl( node->members , *this ); 758 maybeAccept_impl( node->attributes, *this ); 752 759 753 760 VISIT_END( node ); … … 763 770 maybeAccept_impl( node->parameters, *this ); 764 771 maybeAccept_impl( node->members , *this ); 772 maybeAccept_impl( node->attributes, *this ); 765 773 766 774 VISIT_END( node ); … … 776 784 maybeMutate_impl( node->parameters, *this ); 777 785 maybeMutate_impl( node->members , *this ); 786 maybeMutate_impl( node->attributes, *this ); 778 787 779 788 MUTATE_END( Declaration, node ); … … 790 799 maybeAccept_impl( node->parameters, *this ); 791 800 maybeAccept_impl( node->members , *this ); 801 maybeAccept_impl( node->attributes, *this ); 792 802 } 793 803 … … 805 815 maybeAccept_impl( node->parameters, *this ); 806 816 maybeAccept_impl( node->members , *this ); 817 maybeAccept_impl( node->attributes, *this ); 807 818 } 808 819 … … 820 831 maybeMutate_impl( node->parameters, *this ); 821 832 maybeMutate_impl( node->members , *this ); 833 maybeMutate_impl( node->attributes, *this ); 822 834 } 823 835 … … 3856 3868 3857 3869 //-------------------------------------------------------------------------- 3858 // Attribute3870 // Constant 3859 3871 template< typename pass_type > 3860 3872 void PassVisitor< pass_type >::visit( Constant * node ) { -
src/SymTab/Validate.cc
r1d61b67 r798a8b3 1152 1152 GuardScope( typedeclNames ); 1153 1153 mutateAll( aggr->parameters, * visitor ); 1154 mutateAll( aggr->attributes, * visitor ); 1154 1155 1155 1156 // unroll mutateAll for aggr->members so that implicit typedefs for nested types are added to the aggregate body.
Note: See TracChangeset
for help on using the changeset viewer.