Changeset 6a45bd78 for src/AST


Ignore:
Timestamp:
Dec 10, 2020, 3:59:41 PM (5 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
3e3f236
Parents:
d4e338f
Message:

cleanup: remove params in TypeDecl (never used)

Location:
src/AST
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    rd4e338f r6a45bd78  
    233233        const ast::Decl * namedTypePostamble( NamedTypeDecl * decl, const ast::NamedTypeDecl * node ) {
    234234                // base comes from constructor
    235                 decl->parameters = get<TypeDecl>().acceptL( node->params );
    236235                decl->assertions = get<DeclarationWithType>().acceptL( node->assertions );
    237236                declPostamble( decl, node );
     
    17041703                cache.emplace( old, decl );
    17051704                decl->assertions = GET_ACCEPT_V(assertions, DeclWithType);
    1706                 decl->params     = GET_ACCEPT_V(parameters, TypeDecl);
    17071705                decl->extension  = old->extension;
    17081706                decl->uniqueId   = old->uniqueId;
     
    17201718                );
    17211719                decl->assertions = GET_ACCEPT_V(assertions, DeclWithType);
    1722                 decl->params     = GET_ACCEPT_V(parameters, TypeDecl);
    17231720                decl->extension  = old->extension;
    17241721                decl->uniqueId   = old->uniqueId;
  • src/AST/Decl.hpp

    rd4e338f r6a45bd78  
    154154public:
    155155        ptr<Type> base;
    156         std::vector<ptr<TypeDecl>> params;
    157156        std::vector<ptr<DeclWithType>> assertions;
    158157
     
    160159                const CodeLocation & loc, const std::string & name, Storage::Classes storage,
    161160                const Type * b, Linkage::Spec spec = Linkage::Cforall )
    162         : Decl( loc, name, storage, spec ), base( b ), params(), assertions() {}
     161        : Decl( loc, name, storage, spec ), base( b ), assertions() {}
    163162
    164163        /// Produces a name for the kind of alias
  • src/AST/Pass.impl.hpp

    rd4e338f r6a45bd78  
    609609        VISIT({
    610610                guard_symtab guard { *this };
    611                 maybe_accept( node, &TypeDecl::params );
    612611                maybe_accept( node, &TypeDecl::base   );
    613612        })
     
    638637        VISIT({
    639638                guard_symtab guard { *this };
    640                 maybe_accept( node, &TypedefDecl::params );
    641639                maybe_accept( node, &TypedefDecl::base   );
    642640        })
  • src/AST/Print.cpp

    rd4e338f r6a45bd78  
    221221                        ++indent;
    222222                        node->base->accept( *this );
    223                         --indent;
    224                 }
    225 
    226                 if ( ! node->params.empty() ) {
    227                         os << endl << indent << "... with parameters" << endl;
    228                         ++indent;
    229                         printAll( node->params );
    230223                        --indent;
    231224                }
Note: See TracChangeset for help on using the changeset viewer.