Changeset 5bf685f for src/Parser/TypeData.cc
- Timestamp:
- Jan 17, 2024, 3:13:56 PM (5 months ago)
- Branches:
- master
- Children:
- 11f65b3
- Parents:
- e891349
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
re891349 r5bf685f 167 167 TypeData * newtype = new TypeData( kind ); 168 168 newtype->qualifiers = qualifiers; 169 newtype->base = maybeC lone( base );170 newtype->forall = maybeC lone( forall );169 newtype->base = maybeCopy( base ); 170 newtype->forall = maybeCopy( forall ); 171 171 172 172 switch ( kind ) { … … 185 185 break; 186 186 case Array: 187 newtype->array.dimension = maybeC lone( array.dimension );187 newtype->array.dimension = maybeCopy( array.dimension ); 188 188 newtype->array.isVarLen = array.isVarLen; 189 189 newtype->array.isStatic = array.isStatic; 190 190 break; 191 191 case Function: 192 newtype->function.params = maybeC lone( function.params );193 newtype->function.idList = maybeC lone( function.idList );194 newtype->function.oldDeclList = maybeC lone( function.oldDeclList );195 newtype->function.body = maybeC lone( function.body );196 newtype->function.withExprs = maybeC lone( function.withExprs );192 newtype->function.params = maybeCopy( function.params ); 193 newtype->function.idList = maybeCopy( function.idList ); 194 newtype->function.oldDeclList = maybeCopy( function.oldDeclList ); 195 newtype->function.body = maybeCopy( function.body ); 196 newtype->function.withExprs = maybeCopy( function.withExprs ); 197 197 break; 198 198 case Aggregate: 199 199 newtype->aggregate.kind = aggregate.kind; 200 200 newtype->aggregate.name = aggregate.name ? new string( *aggregate.name ) : nullptr; 201 newtype->aggregate.params = maybeC lone( aggregate.params );202 newtype->aggregate.actuals = maybeC lone( aggregate.actuals );203 newtype->aggregate.fields = maybeC lone( aggregate.fields );201 newtype->aggregate.params = maybeCopy( aggregate.params ); 202 newtype->aggregate.actuals = maybeCopy( aggregate.actuals ); 203 newtype->aggregate.fields = maybeCopy( aggregate.fields ); 204 204 newtype->aggregate.body = aggregate.body; 205 205 newtype->aggregate.anon = aggregate.anon; … … 208 208 break; 209 209 case AggregateInst: 210 newtype->aggInst.aggregate = maybeC lone( aggInst.aggregate );211 newtype->aggInst.params = maybeC lone( aggInst.params );210 newtype->aggInst.aggregate = maybeCopy( aggInst.aggregate ); 211 newtype->aggInst.params = maybeCopy( aggInst.params ); 212 212 newtype->aggInst.hoistType = aggInst.hoistType; 213 213 break; 214 214 case Enum: 215 215 newtype->enumeration.name = enumeration.name ? new string( *enumeration.name ) : nullptr; 216 newtype->enumeration.constants = maybeC lone( enumeration.constants );216 newtype->enumeration.constants = maybeCopy( enumeration.constants ); 217 217 newtype->enumeration.body = enumeration.body; 218 218 newtype->enumeration.anon = enumeration.anon; … … 221 221 case SymbolicInst: 222 222 newtype->symbolic.name = symbolic.name ? new string( *symbolic.name ) : nullptr; 223 newtype->symbolic.params = maybeC lone( symbolic.params );224 newtype->symbolic.actuals = maybeC lone( symbolic.actuals );225 newtype->symbolic.assertions = maybeC lone( symbolic.assertions );223 newtype->symbolic.params = maybeCopy( symbolic.params ); 224 newtype->symbolic.actuals = maybeCopy( symbolic.actuals ); 225 newtype->symbolic.assertions = maybeCopy( symbolic.assertions ); 226 226 newtype->symbolic.isTypedef = symbolic.isTypedef; 227 227 break; 228 228 case Tuple: 229 newtype->tuple = maybeC lone( tuple );229 newtype->tuple = maybeCopy( tuple ); 230 230 break; 231 231 case Typeof: 232 232 case Basetypeof: 233 newtype->typeexpr = maybeC lone( typeexpr );233 newtype->typeexpr = maybeCopy( typeexpr ); 234 234 break; 235 235 case Vtable: … … 240 240 break; 241 241 case Qualified: 242 newtype->qualified.parent = maybeC lone( qualified.parent );243 newtype->qualified.child = maybeC lone( qualified.child );242 newtype->qualified.parent = maybeCopy( qualified.parent ); 243 newtype->qualified.child = maybeCopy( qualified.child ); 244 244 break; 245 245 } // switch
Note: See TracChangeset
for help on using the changeset viewer.