Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r0e73845 rf0ecf9b  
    8484        Expression *asmName;
    8585        std::list< Attribute * > attributes;
    86         bool isDeleted = false;
    8786
    8887        DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs );
     
    152151        FunctionType *type;
    153152        CompoundStmt *statements;
    154         std::list< Expression * > withExprs;
    155153
    156154        FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements,
     
    202200        typedef NamedTypeDecl Parent;
    203201  public:
    204         enum Kind { Dtype, Ftype, Ttype, NUMBER_OF_KINDS };
     202        enum Kind { Dtype, Ftype, Ttype };
    205203
    206204        Type * init;
     
    246244        typedef NamedTypeDecl Parent;
    247245  public:
    248         TypedefDecl( const std::string &name, CodeLocation location, Type::StorageClasses scs, Type *type, LinkageSpec::Spec spec = LinkageSpec::Cforall )
    249                 : Parent( name, scs, type ) { set_linkage( spec ); this->location = location; }
    250 
     246        TypedefDecl( const std::string &name, Type::StorageClasses scs, Type *type, LinkageSpec::Spec spec = LinkageSpec::Cforall ) : Parent( name, scs, type ) { set_linkage( spec ); }
    251247        TypedefDecl( const TypedefDecl &other ) : Parent( other ) {}
    252248
     
    266262        bool body;
    267263        std::list< Attribute * > attributes;
    268         AggregateDecl * parent = nullptr;
    269264
    270265        AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall );
     
    324319        EnumDecl( const EnumDecl &other ) : Parent( other ) {}
    325320
    326         bool valueOf( Declaration * enumerator, long long int & value );
    327 
    328321        virtual EnumDecl *clone() const override { return new EnumDecl( *this ); }
    329322        virtual void accept( Visitor &v ) override { v.visit( this ); }
    330323        virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    331324  private:
    332         std::map< std::string, long long int > enumValues;
    333325        virtual std::string typeString() const override;
    334326};
     
    363355        virtual void accept( Visitor &v ) override { v.visit( this ); }
    364356        virtual AsmDecl *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    365         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
    366         virtual void printShort( std::ostream &os, Indenter indent = {} ) const override;
    367 };
    368 
    369 class StaticAssertDecl : public Declaration {
    370 public:
    371         Expression * condition;
    372         ConstantExpr * message;   // string literal
    373 
    374         StaticAssertDecl( Expression * condition, ConstantExpr * message );
    375         StaticAssertDecl( const StaticAssertDecl & other );
    376         virtual ~StaticAssertDecl();
    377 
    378         virtual StaticAssertDecl * clone() const override { return new StaticAssertDecl( *this ); }
    379         virtual void accept( Visitor &v ) override { v.visit( this ); }
    380         virtual StaticAssertDecl * acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    381357        virtual void print( std::ostream &os, Indenter indent = {} ) const override;
    382358        virtual void printShort( std::ostream &os, Indenter indent = {} ) const override;
Note: See TracChangeset for help on using the changeset viewer.