Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.hpp

    r77de429 re874605  
    414414};
    415415
     416class InlineValueDecl final : public DeclWithType {
     417public:
     418        ptr<Type> type;
     419
     420        InlineValueDecl( const CodeLocation & loc, const std::string & name, const Type * type,
     421                Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::Cforall,
     422                std::vector< ptr<Attribute> > && attrs = {}, Function::Specs fs = {} )
     423        : DeclWithType( loc, name, storage, linkage, std::move(attrs), fs ), type( type ) {}
     424
     425        const Type * get_type() const override { return type; }
     426        void set_type( const Type * ty ) override { type = ty; }
     427
     428        const DeclWithType * accept( Visitor& v ) const override { return v.visit( this ); }
     429private:
     430        InlineValueDecl * clone() const override { return new InlineValueDecl{ *this }; }
     431        MUTATE_FRIEND
     432};
    416433}
    417434
Note: See TracChangeset for help on using the changeset viewer.