Changeset 7dc09294 for src/SynTree


Ignore:
Timestamp:
Sep 13, 2017, 7:27:12 AM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
982832e
Parents:
ada0eb06 (diff), 4639b0d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/SynTree
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    rada0eb06 r7dc09294  
    136136        Expression *get_bitfieldWidth() const { return bitfieldWidth; }
    137137        void set_bitfieldWidth( Expression *newValue ) { bitfieldWidth = newValue; }
     138
     139        static ObjectDecl * newObject( const std::string & name, Type * type, Initializer * init );
    138140
    139141        virtual ObjectDecl *clone() const { return new ObjectDecl( *this ); }
     
    230232        virtual TypeDecl *clone() const { return new TypeDecl( *this ); }
    231233        virtual void accept( Visitor &v ) { v.visit( this ); }
    232         virtual TypeDecl *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     234        virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    233235        virtual void print( std::ostream &os, int indent = 0 ) const;
    234236
  • src/SynTree/Mutator.cc

    rada0eb06 r7dc09294  
    7878}
    7979
    80 TypeDecl * Mutator::mutate( TypeDecl *typeDecl ) {
     80Declaration * Mutator::mutate( TypeDecl *typeDecl ) {
    8181        handleNamedTypeDecl( typeDecl );
    8282        typeDecl->set_init( maybeMutate( typeDecl->get_init(), *this ) );
  • src/SynTree/Mutator.h

    rada0eb06 r7dc09294  
    3131        virtual Declaration* mutate( EnumDecl *aggregateDecl );
    3232        virtual Declaration* mutate( TraitDecl *aggregateDecl );
    33         virtual TypeDecl* mutate( TypeDecl *typeDecl );
     33        virtual Declaration* mutate( TypeDecl *typeDecl );
    3434        virtual Declaration* mutate( TypedefDecl *typeDecl );
    3535        virtual AsmDecl* mutate( AsmDecl *asmDecl );
  • src/SynTree/ObjectDecl.cc

    rada0eb06 r7dc09294  
    3838        delete init;
    3939        delete bitfieldWidth;
     40}
     41
     42ObjectDecl * ObjectDecl::newObject( const std::string & name, Type * type, Initializer * init ) {
     43        return new ObjectDecl( name, Type::StorageClasses(), LinkageSpec::C, 0, type, init );
    4044}
    4145
  • src/SynTree/Statement.cc

    rada0eb06 r7dc09294  
    472472}
    473473
    474 NullStmt::NullStmt( std::list<Label> labels ) : CompoundStmt( labels ) {}
    475 NullStmt::NullStmt() : CompoundStmt( std::list<Label>() ) {}
     474NullStmt::NullStmt( std::list<Label> labels ) : Statement( labels ) {}
     475NullStmt::NullStmt() : Statement( std::list<Label>() ) {}
    476476
    477477void NullStmt::print( std::ostream &os, __attribute__((unused)) int indent ) const {
  • src/SynTree/Statement.h

    rada0eb06 r7dc09294  
    6767};
    6868
    69 class NullStmt : public CompoundStmt {
     69class NullStmt : public Statement {
    7070  public:
    7171        NullStmt();
Note: See TracChangeset for help on using the changeset viewer.