Changeset 2e9b59b for src/AST/Decl.hpp
- Timestamp:
- Apr 19, 2022, 3:00:04 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 5b84a321
- Parents:
- ba897d21 (diff), bb7c77d (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
rba897d21 r2e9b59b 302 302 class EnumDecl final : public AggregateDecl { 303 303 public: 304 ptr<Type> base; 305 304 306 EnumDecl( const CodeLocation& loc, const std::string& name, 305 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall ) 306 : AggregateDecl( loc, name, std::move(attrs), linkage ), enumValues() {} 307 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, Type * base = nullptr, 308 std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() ) 309 : AggregateDecl( loc, name, std::move(attrs), linkage ), base(base), enumValues(enumValues) {} 307 310 308 311 /// gets the integer value for this enumerator, returning true iff value found 312 // Maybe it is not used in producing the enum value 309 313 bool valueOf( const Decl * enumerator, long long& value ) const; 310 314 … … 312 316 313 317 const char * typeString() const override { return aggrString( Enum ); } 318 319 bool isTyped() {return base && base.get();} 314 320 315 321 private:
Note:
See TracChangeset
for help on using the changeset viewer.