Changeset 68f9c43 for src/ResolvExpr/AdjustExprType.cc
- Timestamp:
- Mar 16, 2018, 5:15:02 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- 8d7bef2
- Parents:
- 6171841
- git-author:
- Aaron Moss <a3moss@…> (03/16/18 17:04:24)
- git-committer:
- Aaron Moss <a3moss@…> (03/16/18 17:15:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AdjustExprType.cc
r6171841 r68f9c43 66 66 67 67 Type * AdjustExprType::postmutate( ArrayType * arrayType ) { 68 PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->base ); 69 arrayType->base = nullptr; 70 delete arrayType; 71 return pointerType; 68 return new PointerType{ arrayType->get_qualifiers(), arrayType->base }; 72 69 } 73 70 74 71 Type * AdjustExprType::postmutate( FunctionType * functionType ) { 75 return new PointerType ( Type::Qualifiers(), functionType );72 return new PointerType{ Type::Qualifiers(), functionType }; 76 73 } 77 74 … … 80 77 if ( env.lookup( typeInst->get_name(), eqvClass ) ) { 81 78 if ( eqvClass.data.kind == TypeDecl::Ftype ) { 82 PointerType *pointerType = new PointerType( Type::Qualifiers(), typeInst ); 83 return pointerType; 79 return new PointerType{ Type::Qualifiers(), typeInst }; 84 80 } 85 81 } else if ( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) { 86 82 if ( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) { 87 83 if ( tyDecl->get_kind() == TypeDecl::Ftype ) { 88 PointerType *pointerType = new PointerType( Type::Qualifiers(), typeInst ); 89 return pointerType; 84 return new PointerType{ Type::Qualifiers(), typeInst }; 90 85 } // if 91 86 } // if
Note: See TracChangeset
for help on using the changeset viewer.