Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.hpp

    r3606fe4 rb0d9ff7  
    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::Cforall, const Expr * bitWd = nullptr,
     110                Linkage::Spec linkage = Linkage::C, 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::Cforall,
     145                CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::C,
    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::Cforall,
     151                CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::C,
    152152                std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, bool isVarArgs = false);
    153153
     
    217217
    218218        /// convenience accessor to match Type::isComplete()
    219         bool isComplete() const { return sized; }
     219        bool isComplete() { return sized; }
    220220
    221221        const Decl * accept( Visitor & v ) const override { return v.visit( this ); }
     
    312312class EnumDecl final : public AggregateDecl {
    313313public:
     314        bool isTyped;
    314315        ptr<Type> base;
    315316
    316         EnumDecl( const CodeLocation& loc, const std::string& name,
    317                 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, Type const * base = nullptr,
     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,
    318320                std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() )
    319         : AggregateDecl( loc, name, std::move(attrs), linkage ), base(base), enumValues(enumValues) {}
     321        : AggregateDecl( loc, name, std::move(attrs), linkage ), isTyped(isTyped), base(base), enumValues(enumValues) {}
    320322
    321323        /// gets the integer value for this enumerator, returning true iff value found
     
    327329        const char * typeString() const override { return aggrString( Enum ); }
    328330
    329         bool isTyped() {return base && base.get();}
    330331
    331332private:
Note: See TracChangeset for help on using the changeset viewer.