Changes in src/GenPoly/ScrubTyVars.cc [68f9c43:b8a4f47]
- File:
-
- 1 edited
-
src/GenPoly/ScrubTyVars.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/ScrubTyVars.cc
r68f9c43 rb8a4f47 28 28 if ( ! tyVars ) { 29 29 if ( typeInst->get_isFtype() ) { 30 return new PointerType{ Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) }; 30 delete typeInst; 31 return new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ); 31 32 } else { 32 return new PointerType{ Type::Qualifiers(), new VoidType( typeInst->get_qualifiers() ) }; 33 PointerType * ret = new PointerType( Type::Qualifiers(), new VoidType( typeInst->get_qualifiers() ) ); 34 delete typeInst; 35 return ret; 33 36 } 34 37 } … … 39 42 case TypeDecl::Dtype: 40 43 case TypeDecl::Ttype: 41 return new PointerType{ Type::Qualifiers(), new VoidType( typeInst->get_qualifiers() ) }; 44 { 45 PointerType * ret = new PointerType( Type::Qualifiers(), new VoidType( typeInst->get_qualifiers() ) ); 46 delete typeInst; 47 return ret; 48 } 42 49 case TypeDecl::Ftype: 43 return new PointerType{ Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) }; 50 delete typeInst; 51 return new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ); 44 52 } // switch 45 53 } // if … … 49 57 Type * ScrubTyVars::mutateAggregateType( Type * ty ) { 50 58 if ( shouldScrub( ty ) ) { 51 return new PointerType{ Type::Qualifiers(), new VoidType( ty->get_qualifiers() ) }; 59 PointerType * ret = new PointerType( Type::Qualifiers(), new VoidType( ty->get_qualifiers() ) ); 60 delete ty; 61 return ret; 52 62 } 53 63 return ty; … … 94 104 Type * ret = dynType->acceptMutator( *visitor ); 95 105 ret->get_qualifiers() |= pointer->get_qualifiers(); 106 pointer->base = nullptr; 107 delete pointer; 96 108 return ret; 97 109 }
Note:
See TracChangeset
for help on using the changeset viewer.