Changeset 1e1e15b


Ignore:
Timestamp:
Jun 23, 2016, 12:16:45 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0caaa6a
Parents:
51fcaf8d
git-author:
Rob Schluntz <rschlunt@…> (06/23/16 11:29:38)
git-committer:
Rob Schluntz <rschlunt@…> (06/23/16 12:16:45)
Message:

rename non-virtual visit functions in Visitor base class which prevents using Visitor::visit statement

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.h

    r51fcaf8d r1e1e15b  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Indexer.h -- 
     7// Indexer.h --
    88//
    99// Author           : Richard C. Bilson
     
    3333                Indexer& operator= ( Indexer &&that );
    3434
    35                 //using Visitor::visit;
     35                using Visitor::visit;
    3636                virtual void visit( ObjectDecl *objectDecl );
    3737                virtual void visit( FunctionDecl *functionDecl );
     
    5454                virtual void visit( MemberExpr *memberExpr );
    5555                virtual void visit( VariableExpr *variableExpr );
    56                 virtual void visit( ConstantExpr *constantExpr ); 
     56                virtual void visit( ConstantExpr *constantExpr );
    5757                virtual void visit( SizeofExpr *sizeofExpr );
    5858                virtual void visit( AlignofExpr *alignofExpr );
     
    9393                /// Gets the top-most trait declaration with the given ID
    9494                TraitDecl *lookupTrait( const std::string &id ) const;
    95  
     95
    9696                void print( std::ostream &os, int indent = 0 ) const;
    9797          private:
     
    106106                UnionDecl *lookupUnionAtScope( const std::string &id, unsigned long scope ) const;
    107107                TraitDecl *lookupTraitAtScope( const std::string &id, unsigned long scope ) const;
    108                
     108
    109109                void addId( DeclarationWithType *decl );
    110110                void addType( NamedTypeDecl *decl );
     
    115115                void addUnion( UnionDecl *decl );
    116116                void addTrait( TraitDecl *decl );
    117                
     117
    118118                struct Impl;
    119119                Impl *tables;         ///< Copy-on-write instance of table data structure
  • src/SynTree/Visitor.cc

    r51fcaf8d r1e1e15b  
    3939}
    4040
    41 void Visitor::visit( AggregateDecl *aggregateDecl ) {
     41void Visitor::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
    4242        acceptAll( aggregateDecl->get_parameters(), *this );
    4343        acceptAll( aggregateDecl->get_members(), *this );
     
    4545
    4646void Visitor::visit( StructDecl *aggregateDecl ) {
    47         visit( static_cast< AggregateDecl* >( aggregateDecl ) );
     47        handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
    4848}
    4949
    5050void Visitor::visit( UnionDecl *aggregateDecl ) {
    51         visit( static_cast< AggregateDecl* >( aggregateDecl ) );
     51        handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
    5252}
    5353
    5454void Visitor::visit( EnumDecl *aggregateDecl ) {
    55         visit( static_cast< AggregateDecl* >( aggregateDecl ) );
     55        handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
    5656}
    5757
    5858void Visitor::visit( TraitDecl *aggregateDecl ) {
    59         visit( static_cast< AggregateDecl* >( aggregateDecl ) );
    60 }
    61 
    62 void Visitor::visit( NamedTypeDecl *typeDecl ) {
     59        handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
     60}
     61
     62void Visitor::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
    6363        acceptAll( typeDecl->get_parameters(), *this );
    6464        acceptAll( typeDecl->get_assertions(), *this );
     
    6767
    6868void Visitor::visit( TypeDecl *typeDecl ) {
    69         visit( static_cast< NamedTypeDecl* >( typeDecl ) );
     69        handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
    7070}
    7171
    7272void Visitor::visit( TypedefDecl *typeDecl ) {
    73         visit( static_cast< NamedTypeDecl* >( typeDecl ) );
     73        handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
    7474}
    7575
     
    330330}
    331331
    332 void Visitor::visit( ReferenceToType *aggregateUseType ) {
     332void Visitor::handleReferenceToType( ReferenceToType *aggregateUseType ) {
    333333        acceptAll( aggregateUseType->get_forall(), *this );
    334334        acceptAll( aggregateUseType->get_parameters(), *this );
     
    336336
    337337void Visitor::visit( StructInstType *aggregateUseType ) {
    338         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     338        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    339339}
    340340
    341341void Visitor::visit( UnionInstType *aggregateUseType ) {
    342         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     342        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    343343}
    344344
    345345void Visitor::visit( EnumInstType *aggregateUseType ) {
    346         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     346        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    347347}
    348348
    349349void Visitor::visit( TraitInstType *aggregateUseType ) {
    350         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     350        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    351351        acceptAll( aggregateUseType->get_members(), *this );
    352352}
    353353
    354354void Visitor::visit( TypeInstType *aggregateUseType ) {
    355         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     355        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    356356}
    357357
  • src/SynTree/Visitor.h

    r51fcaf8d r1e1e15b  
    104104        virtual void visit( Constant *constant );
    105105  private:
    106         virtual void visit( AggregateDecl *aggregateDecl );
    107         virtual void visit( NamedTypeDecl *typeDecl );
    108         virtual void visit( ReferenceToType *aggregateUseType );
     106        virtual void handleAggregateDecl( AggregateDecl *aggregateDecl );
     107        virtual void handleNamedTypeDecl( NamedTypeDecl *typeDecl );
     108        virtual void handleReferenceToType( ReferenceToType *aggregateUseType );
    109109};
    110110
Note: See TracChangeset for help on using the changeset viewer.