- Timestamp:
- Jul 12, 2022, 3:21:18 PM (22 months ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- b9f8274
- Parents:
- 9c6443e
- Location:
- src/AST
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r9c6443e r1931bb01 168 168 auto attr = get<Attribute>().acceptL( node->attributes ); 169 169 170 // This field can be unset very early on (Pre-FixReturnTypes). 171 auto newType = (type) ? type->clone() : nullptr; 172 170 173 auto decl = new ObjectDecl( 171 174 node->name, … … 173 176 LinkageSpec::Spec( node->linkage.val ), 174 177 bfwd, 175 type->clone(),178 newType, 176 179 nullptr, // prevent infinite loop 177 180 attr, … … 1579 1582 1580 1583 virtual void visit( const ObjectDecl * old ) override final { 1584 if ( inCache( old ) ) { 1585 return; 1586 } 1581 1587 auto&& type = GET_ACCEPT_1(type, Type); 1582 1588 auto&& init = GET_ACCEPT_1(init, Init); 1583 1589 auto&& bfwd = GET_ACCEPT_1(bitfieldWidth, Expr); 1584 1590 auto&& attr = GET_ACCEPT_V(attributes, Attribute); 1585 if ( inCache( old ) ) { 1586 return; 1587 } 1591 1588 1592 auto decl = new ast::ObjectDecl( 1589 1593 old->location, -
src/AST/Decl.hpp
r9c6443e r1931bb01 315 315 316 316 EnumDecl( const CodeLocation& loc, const std::string& name, 317 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, Type * base = nullptr,317 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, Type const * base = nullptr, 318 318 std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() ) 319 319 : AggregateDecl( loc, name, std::move(attrs), linkage ), base(base), enumValues(enumValues) {}
Note: See TracChangeset
for help on using the changeset viewer.