Changes in / [7e1cb79:cb304ca]
- Files:
-
- 6 edited
-
src/AST/Pass.impl.hpp (modified) (5 diffs)
-
src/Common/PassVisitor.impl.h (modified) (13 diffs)
-
src/SymTab/Validate.cc (modified) (1 diff)
-
tests/.expect/typedefRedef-ERR1.txt (modified) (1 diff)
-
tests/.expect/typedefRedef.txt (modified) (1 diff)
-
tests/typedefRedef.cfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.impl.hpp
r7e1cb79 rcb304ca 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 ); 526 maybe_accept( node, &StructDecl::attributes ); 524 maybe_accept( node, &StructDecl::params ); 525 maybe_accept( node, &StructDecl::members ); 527 526 }) 528 527 … … 544 543 VISIT({ 545 544 guard_symtab guard { * this }; 546 maybe_accept( node, &UnionDecl::params ); 547 maybe_accept( node, &UnionDecl::members ); 548 maybe_accept( node, &UnionDecl::attributes ); 545 maybe_accept( node, &UnionDecl::params ); 546 maybe_accept( node, &UnionDecl::members ); 549 547 }) 550 548 … … 564 562 VISIT( 565 563 // unlike structs, traits, and unions, enums inject their members into the global scope 566 maybe_accept( node, &EnumDecl::params ); 567 maybe_accept( node, &EnumDecl::members ); 568 maybe_accept( node, &EnumDecl::attributes ); 564 maybe_accept( node, &EnumDecl::params ); 565 maybe_accept( node, &EnumDecl::members ); 569 566 ) 570 567 … … 580 577 VISIT({ 581 578 guard_symtab guard { *this }; 582 maybe_accept( node, &TraitDecl::params ); 583 maybe_accept( node, &TraitDecl::members ); 584 maybe_accept( node, &TraitDecl::attributes ); 579 maybe_accept( node, &TraitDecl::params ); 580 maybe_accept( node, &TraitDecl::members ); 585 581 }) 586 582 -
src/Common/PassVisitor.impl.h
r7e1cb79 rcb304ca 636 636 maybeAccept_impl( node->parameters, *this ); 637 637 maybeAccept_impl( node->members , *this ); 638 maybeAccept_impl( node->attributes, *this );639 638 } 640 639 … … 657 656 maybeAccept_impl( node->parameters, *this ); 658 657 maybeAccept_impl( node->members , *this ); 659 maybeAccept_impl( node->attributes, *this );660 658 } 661 659 … … 678 676 maybeMutate_impl( node->parameters, *this ); 679 677 maybeMutate_impl( node->members , *this ); 680 maybeMutate_impl( node->attributes, *this );681 678 } 682 679 … … 700 697 maybeAccept_impl( node->parameters, *this ); 701 698 maybeAccept_impl( node->members , *this ); 702 maybeAccept_impl( node->attributes, *this );703 699 } 704 700 … … 718 714 maybeAccept_impl( node->parameters, *this ); 719 715 maybeAccept_impl( node->members , *this ); 720 maybeAccept_impl( node->attributes, *this );721 716 } 722 717 … … 737 732 maybeMutate_impl( node->parameters, *this ); 738 733 maybeMutate_impl( node->members , *this ); 739 maybeMutate_impl( node->attributes, *this );740 734 } 741 735 … … 756 750 maybeAccept_impl( node->parameters, *this ); 757 751 maybeAccept_impl( node->members , *this ); 758 maybeAccept_impl( node->attributes, *this );759 752 760 753 VISIT_END( node ); … … 770 763 maybeAccept_impl( node->parameters, *this ); 771 764 maybeAccept_impl( node->members , *this ); 772 maybeAccept_impl( node->attributes, *this );773 765 774 766 VISIT_END( node ); … … 784 776 maybeMutate_impl( node->parameters, *this ); 785 777 maybeMutate_impl( node->members , *this ); 786 maybeMutate_impl( node->attributes, *this );787 778 788 779 MUTATE_END( Declaration, node ); … … 799 790 maybeAccept_impl( node->parameters, *this ); 800 791 maybeAccept_impl( node->members , *this ); 801 maybeAccept_impl( node->attributes, *this );802 792 } 803 793 … … 815 805 maybeAccept_impl( node->parameters, *this ); 816 806 maybeAccept_impl( node->members , *this ); 817 maybeAccept_impl( node->attributes, *this );818 807 } 819 808 … … 831 820 maybeMutate_impl( node->parameters, *this ); 832 821 maybeMutate_impl( node->members , *this ); 833 maybeMutate_impl( node->attributes, *this );834 822 } 835 823 … … 3868 3856 3869 3857 //-------------------------------------------------------------------------- 3870 // Constant3858 // Attribute 3871 3859 template< typename pass_type > 3872 3860 void PassVisitor< pass_type >::visit( Constant * node ) { -
src/SymTab/Validate.cc
r7e1cb79 rcb304ca 1152 1152 GuardScope( typedeclNames ); 1153 1153 mutateAll( aggr->parameters, * visitor ); 1154 mutateAll( aggr->attributes, * visitor );1155 1154 1156 1155 // unroll mutateAll for aggr->members so that implicit typedefs for nested types are added to the aggregate body. -
tests/.expect/typedefRedef-ERR1.txt
r7e1cb79 rcb304ca 1 typedefRedef.cfa: 75:25: warning: Compiled1 typedefRedef.cfa:69:25: warning: Compiled 2 2 typedefRedef.cfa:4:1 error: Cannot redefine typedef: Foo 3 typedefRedef.cfa: 65:1 error: Cannot redefine typedef: ARR3 typedefRedef.cfa:59:1 error: Cannot redefine typedef: ARR -
tests/.expect/typedefRedef.txt
r7e1cb79 rcb304ca 1 typedefRedef.cfa: 75:25: warning: Compiled1 typedefRedef.cfa:69:25: warning: Compiled -
tests/typedefRedef.cfa
r7e1cb79 rcb304ca 45 45 typedef int X2; 46 46 47 X2 value __attribute__((aligned(4 * sizeof(X2))));48 49 __attribute__((aligned(4 * sizeof(X2)))) struct rseq_cs {50 int foo;51 };52 53 47 // xxx - this doesn't work yet due to parsing problems with generic types 54 48 // #ifdef __CFA__
Note:
See TracChangeset
for help on using the changeset viewer.