Changeset 798a8b3 for src/AST


Ignore:
Timestamp:
Jun 16, 2021, 2:44:09 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
7e1cb79
Parents:
1d61b67
Message:

Attributes are now correctly visited when replacing typedefs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.impl.hpp

    r1d61b67 r798a8b3  
    479479                        guard_symtab guard { *this };
    480480                        // 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{
    482482                                CodeLocation{}, "__func__",
    483483                                new ast::ArrayType{
     
    522522        VISIT({
    523523                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 );
    526527        })
    527528
     
    543544        VISIT({
    544545                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 );
    547549        })
    548550
     
    562564        VISIT(
    563565                // 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 );
    566569        )
    567570
     
    577580        VISIT({
    578581                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 );
    581585        })
    582586
Note: See TracChangeset for help on using the changeset viewer.