Changes in src/AST/Decl.hpp [b0d9ff7:3606fe4]
- File:
-
- 1 edited
-
src/AST/Decl.hpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
rb0d9ff7 r3606fe4 108 108 ObjectDecl( const CodeLocation & loc, const std::string & name, const Type * type, 109 109 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, 111 111 std::vector< ptr<Attribute> > && attrs = {}, Function::Specs fs = {} ) 112 112 : DeclWithType( loc, name, storage, linkage, std::move(attrs), fs ), type( type ), … … 143 143 FunctionDecl( const CodeLocation & loc, const std::string & name, std::vector<ptr<TypeDecl>>&& forall, 144 144 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, 146 146 std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, bool isVarArgs = false); 147 147 … … 149 149 std::vector<ptr<TypeDecl>>&& forall, std::vector<ptr<DeclWithType>>&& assertions, 150 150 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, 152 152 std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, bool isVarArgs = false); 153 153 … … 217 217 218 218 /// convenience accessor to match Type::isComplete() 219 bool isComplete() { return sized; }219 bool isComplete() const { return sized; } 220 220 221 221 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } … … 312 312 class EnumDecl final : public AggregateDecl { 313 313 public: 314 bool isTyped;315 314 ptr<Type> base; 316 315 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, 320 318 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) {} 322 320 323 321 /// gets the integer value for this enumerator, returning true iff value found … … 329 327 const char * typeString() const override { return aggrString( Enum ); } 330 328 329 bool isTyped() {return base && base.get();} 331 330 332 331 private:
Note:
See TracChangeset
for help on using the changeset viewer.