Changeset 417117e for src/ResolvExpr


Ignore:
Timestamp:
Jun 28, 2019, 3:50:21 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
03bf5c8
Parents:
55b6476
Message:

Assorted cleanup

Location:
src/ResolvExpr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    r55b6476 r417117e  
    370370                                                        // push empty tuple expression
    371371                                                        newResult.parent = i;
    372                                                         std::vector< ast::ptr< ast::Expr > > emptyList;
    373                                                         newResult.expr =
    374                                                                 new ast::TupleExpr{ CodeLocation{}, move( emptyList ) };
     372                                                        newResult.expr = new ast::TupleExpr{ CodeLocation{}, {} };
    375373                                                        argType = newResult.expr->result;
    376374                                                } else {
  • src/ResolvExpr/ResolveTypeof.cc

    r55b6476 r417117e  
    153153                        }
    154154
    155                         return newType;
     155                        return newType.release();
    156156                }
    157157        };
  • src/ResolvExpr/Resolver.cc

    r55b6476 r417117e  
    11091109               
    11101110                // set up and resolve expression cast to void
    1111                 ast::CastExpr * untyped = new ast::CastExpr{ expr };
     1111                ast::ptr< ast::CastExpr > untyped = new ast::CastExpr{ expr };
    11121112                CandidateRef choice = findUnfinishedKindExpression(
    11131113                        untyped, symtab, "", anyCandidate, ResolvMode::withAdjustment() );
     
    12481248        };
    12491249
    1250         void resolve( std::list< ast::ptr<ast::Decl> >& translationUnit ) {
     1250        void resolve( std::list< ast::ptr< ast::Decl > >& translationUnit ) {
    12511251                ast::Pass< Resolver_new > resolver;
    12521252                accept_all( translationUnit, resolver );
     
    12821282                ast::ptr< ast::FunctionDecl > ret = functionDecl;
    12831283                for ( unsigned i = 0; i < functionDecl->type->params.size(); ++i ) {
    1284                         const ast::ptr<ast::DeclWithType> & d = functionDecl->type->params[i];
     1284                        const ast::ptr< ast::DeclWithType > & d = functionDecl->type->params[i];
    12851285
    12861286                        if ( const ast::ObjectDecl * obj = d.as< ast::ObjectDecl >() ) {
     
    12991299                        }
    13001300                }
    1301                 return ret.get();
     1301                return ret.release();
    13021302        }
    13031303
Note: See TracChangeset for help on using the changeset viewer.