Ignore:
Timestamp:
Sep 21, 2022, 11:02:15 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
95dab9e
Parents:
428adbc (diff), 0bd46fd (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' into pthread-emulation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r428adbc r7f6a7c9  
    145145        virtual void printShort( std::ostream & os, Indenter indent = {} ) const override;
    146146
    147         // TODO: Move to the right place
    148147        void checkAssignedValue() const;
    149148};
     
    338337        typedef AggregateDecl Parent;
    339338  public:
     339        bool isTyped;
     340        Type * base;
     341
    340342        EnumDecl( const std::string & name,
    341343         const std::list< Attribute * > & attributes = std::list< class Attribute * >(),
    342           LinkageSpec::Spec linkage = LinkageSpec::Cforall,
    343           Type * baseType = nullptr ) : Parent( name, attributes, linkage ) , base( baseType ){}
    344         EnumDecl( const EnumDecl & other ) : Parent( other ), base( other.base ) {}
    345 
     344          bool isTyped = false, LinkageSpec::Spec linkage = LinkageSpec::Cforall,
     345          Type * baseType = nullptr )
     346          : Parent( name, attributes, linkage ),isTyped(isTyped), base( baseType ) {}
     347        EnumDecl( const EnumDecl & other )
     348          : Parent( other ), isTyped( other.isTyped), base( other.base ) {}
    346349        bool valueOf( Declaration * enumerator, long long int & value );
    347 
    348350        virtual EnumDecl * clone() const override { return new EnumDecl( *this ); }
    349351        virtual void accept( Visitor & v ) override { v.visit( this ); }
    350352        virtual void accept( Visitor & v ) const override { v.visit( this ); }
    351353        virtual Declaration * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
    352         Type * base;
    353         std::unordered_map< std::string, long long int > enumValues;
     354
     355        std::unordered_map< std::string, long long int > enumValues; // This attribute is unused
    354356        virtual void print( std::ostream & os, Indenter indent = {} ) const override final;
    355357  private:
Note: See TracChangeset for help on using the changeset viewer.