Changeset 7f6a7c9 for src/AST/Decl.hpp
- Timestamp:
- Sep 21, 2022, 11:02:15 AM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 95dab9e
- Parents:
- 428adbc (diff), 0bd46fd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
r428adbc r7f6a7c9 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; 314 315 ptr<Type> base; 315 316 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, 318 320 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) {} 320 322 321 323 /// gets the integer value for this enumerator, returning true iff value found … … 327 329 const char * typeString() const override { return aggrString( Enum ); } 328 330 329 bool isTyped() {return base && base.get();}330 331 331 332 private:
Note:
See TracChangeset
for help on using the changeset viewer.