Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.hpp

    rb0d9ff7 r3606fe4  
    108108        ObjectDecl( const CodeLocation & loc, const std::string & name, const Type * type,
    109109                const Init * init = nullptr, Storage::Classes storage = {},
    110                 Linkage::Spec linkage = Linkage::C, const Expr * bitWd = nullptr,
     110                Linkage::Spec linkage = Linkage::Cforall, const Expr * bitWd = nullptr,
    111111                std::vector< ptr<Attribute> > && attrs = {}, Function::Specs fs = {} )
    112112        : DeclWithType( loc, name, storage, linkage, std::move(attrs), fs ), type( type ),
     
    143143        FunctionDecl( const CodeLocation & loc, const std::string & name, std::vector<ptr<TypeDecl>>&& forall,
    144144                std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns,
    145                 CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::C,
     145                CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::Cforall,
    146146                std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, bool isVarArgs = false);
    147147
     
    149149                std::vector<ptr<TypeDecl>>&& forall, std::vector<ptr<DeclWithType>>&& assertions,
    150150                std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns,
    151                 CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::C,
     151                CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::Cforall,
    152152                std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, bool isVarArgs = false);
    153153
     
    217217
    218218        /// convenience accessor to match Type::isComplete()
    219         bool isComplete() { return sized; }
     219        bool isComplete() const { return sized; }
    220220
    221221        const Decl * accept( Visitor & v ) const override { return v.visit( this ); }
     
    312312class EnumDecl final : public AggregateDecl {
    313313public:
    314         bool isTyped;
    315314        ptr<Type> base;
    316315
    317         EnumDecl( const CodeLocation& loc, const std::string& name, bool isTyped = false,
    318                 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall,
    319                 Type const * base = nullptr,
     316        EnumDecl( const CodeLocation& loc, const std::string& name,
     317                std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, Type const * base = nullptr,
    320318                std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() )
    321         : AggregateDecl( loc, name, std::move(attrs), linkage ), isTyped(isTyped), base(base), enumValues(enumValues) {}
     319        : AggregateDecl( loc, name, std::move(attrs), linkage ), base(base), enumValues(enumValues) {}
    322320
    323321        /// gets the integer value for this enumerator, returning true iff value found
     
    329327        const char * typeString() const override { return aggrString( Enum ); }
    330328
     329        bool isTyped() {return base && base.get();}
    331330
    332331private:
Note: See TracChangeset for help on using the changeset viewer.