Index: src/Common/utility.h
===================================================================
--- src/Common/utility.h	(revision 7a5d773bef7683976cf576e842925087727665c2)
+++ src/Common/utility.h	(revision 7ecbb7e54482b80c60d085c0b42a0fff291198ce)
@@ -49,4 +49,12 @@
 }
 
+template< typename T, typename U >
+static inline T * maybeMoveBuild( const U *orig ) {
+	T* ret = maybeBuild<T>(orig);
+	delete orig;
+	return ret;
+}
+
+
 template< typename Input_iterator >
 void printEnums( Input_iterator begin, Input_iterator end, const char * const *name_array, std::ostream &os ) {
Index: src/Parser/ExpressionNode.cc
===================================================================
--- src/Parser/ExpressionNode.cc	(revision 7a5d773bef7683976cf576e842925087727665c2)
+++ src/Parser/ExpressionNode.cc	(revision 7ecbb7e54482b80c60d085c0b42a0fff291198ce)
@@ -167,5 +167,7 @@
 
 NameExpr * build_varref( const string *name, bool labelp ) {
-	return new NameExpr( *name, nullptr );
+	NameExpr *expr = new NameExpr( *name, nullptr );
+	delete name;
+	return expr;
 }
 
@@ -184,12 +186,12 @@
 	if ( dynamic_cast< VoidType * >( targetType ) ) {
 		delete targetType;
-		return new CastExpr( maybeBuild< Expression >(expr_node) );
+		return new CastExpr( maybeMoveBuild< Expression >(expr_node) );
 	} else {
-		return new CastExpr( maybeBuild< Expression >(expr_node), targetType );
+		return new CastExpr( maybeMoveBuild< Expression >(expr_node), targetType );
 	} // if
 }
 
 Expression *build_fieldSel( ExpressionNode *expr_node, NameExpr *member ) {
-	UntypedMemberExpr *ret = new UntypedMemberExpr( member->get_name(), maybeBuild< Expression >(expr_node) );
+	UntypedMemberExpr *ret = new UntypedMemberExpr( member->get_name(), maybeMoveBuild< Expression >(expr_node) );
 	delete member;
 	return ret;
@@ -198,5 +200,5 @@
 Expression *build_pfieldSel( ExpressionNode *expr_node, NameExpr *member ) {
 	UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
-	deref->get_args().push_back( maybeBuild< Expression >(expr_node) );
+	deref->get_args().push_back( maybeMoveBuild< Expression >(expr_node) );
 	UntypedMemberExpr *ret = new UntypedMemberExpr( member->get_name(), deref );
 	delete member;
@@ -205,8 +207,8 @@
 
 Expression *build_addressOf( ExpressionNode *expr_node ) {
-		return new AddressExpr( maybeBuild< Expression >(expr_node) );
+		return new AddressExpr( maybeMoveBuild< Expression >(expr_node) );
 }
 Expression *build_sizeOfexpr( ExpressionNode *expr_node ) {
-	return new SizeofExpr( maybeBuild< Expression >(expr_node) );
+	return new SizeofExpr( maybeMoveBuild< Expression >(expr_node) );
 }
 Expression *build_sizeOftype( DeclarationNode *decl_node ) {
@@ -214,5 +216,5 @@
 }
 Expression *build_alignOfexpr( ExpressionNode *expr_node ) {
-	return new AlignofExpr( maybeBuild< Expression >(expr_node) );
+	return new AlignofExpr( maybeMoveBuild< Expression >(expr_node) );
 }
 Expression *build_alignOftype( DeclarationNode *decl_node ) {
@@ -224,40 +226,40 @@
 
 Expression *build_and_or( ExpressionNode *expr_node1, ExpressionNode *expr_node2, bool kind ) {
-	return new LogicalExpr( notZeroExpr( maybeBuild< Expression >(expr_node1) ), notZeroExpr( maybeBuild< Expression >(expr_node2) ), kind );
+	return new LogicalExpr( notZeroExpr( maybeMoveBuild< Expression >(expr_node1) ), notZeroExpr( maybeMoveBuild< Expression >(expr_node2) ), kind );
 }
 
 Expression *build_unary_val( OperKinds op, ExpressionNode *expr_node ) {
 	std::list< Expression * > args;
-	args.push_back( maybeBuild< Expression >(expr_node) );
+	args.push_back( maybeMoveBuild< Expression >(expr_node) );
 	return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
 }
 Expression *build_unary_ptr( OperKinds op, ExpressionNode *expr_node ) {
 	std::list< Expression * > args;
-	args.push_back( new AddressExpr( maybeBuild< Expression >(expr_node) ) );
+	args.push_back( new AddressExpr( maybeMoveBuild< Expression >(expr_node) ) );
 	return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
 }
 Expression *build_binary_val( OperKinds op, ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
 	std::list< Expression * > args;
-	args.push_back( maybeBuild< Expression >(expr_node1) );
-	args.push_back( maybeBuild< Expression >(expr_node2) );
+	args.push_back( maybeMoveBuild< Expression >(expr_node1) );
+	args.push_back( maybeMoveBuild< Expression >(expr_node2) );
 	return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
 }
 Expression *build_binary_ptr( OperKinds op, ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
 	std::list< Expression * > args;
-	args.push_back( new AddressExpr( maybeBuild< Expression >(expr_node1) ) );
-	args.push_back( maybeBuild< Expression >(expr_node2) );
+	args.push_back( new AddressExpr( maybeMoveBuild< Expression >(expr_node1) ) );
+	args.push_back( maybeMoveBuild< Expression >(expr_node2) );
 	return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
 }
 
 Expression *build_cond( ExpressionNode *expr_node1, ExpressionNode *expr_node2, ExpressionNode *expr_node3 ) {
-	return new ConditionalExpr( notZeroExpr( maybeBuild< Expression >(expr_node1) ), maybeBuild< Expression >(expr_node2), maybeBuild< Expression >(expr_node3) );
+	return new ConditionalExpr( notZeroExpr( maybeMoveBuild< Expression >(expr_node1) ), maybeMoveBuild< Expression >(expr_node2), maybeMoveBuild< Expression >(expr_node3) );
 }
 
 Expression *build_comma( ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
-	return new CommaExpr( maybeBuild< Expression >(expr_node1), maybeBuild< Expression >(expr_node2) );
+	return new CommaExpr( maybeMoveBuild< Expression >(expr_node1), maybeMoveBuild< Expression >(expr_node2) );
 }
 
 Expression *build_attrexpr( NameExpr *var, ExpressionNode * expr_node ) {
-	return new AttrExpr( var, maybeBuild< Expression >(expr_node) );
+	return new AttrExpr( var, maybeMoveBuild< Expression >(expr_node) );
 }
 Expression *build_attrtype( NameExpr *var, DeclarationNode * decl_node ) {
@@ -267,5 +269,5 @@
 Expression *build_tuple( ExpressionNode * expr_node ) {
 	TupleExpr *ret = new TupleExpr();
-	buildList( expr_node, ret->get_exprs() );
+	buildMoveList( expr_node, ret->get_exprs() );
 	return ret;
 }
@@ -273,21 +275,18 @@
 Expression *build_func( ExpressionNode * function, ExpressionNode * expr_node ) {
 	std::list< Expression * > args;
-
-	buildList( expr_node, args );
-	return new UntypedExpr( maybeBuild< Expression >(function), args, nullptr );
+	buildMoveList( expr_node, args );
+	return new UntypedExpr( maybeMoveBuild< Expression >(function), args, nullptr );
 }
 
 Expression *build_range( ExpressionNode * low, ExpressionNode *high ) {
-	Expression *low_cexpr = maybeBuild< Expression >( low );
-	Expression *high_cexpr = maybeBuild< Expression >( high );
-	return new RangeExpr( low_cexpr, high_cexpr );
+	return new RangeExpr( maybeMoveBuild< Expression >( low ), maybeMoveBuild< Expression >( high ) );
 }
 
 Expression *build_asmexpr( ExpressionNode *inout, ConstantExpr *constraint, ExpressionNode *operand ) {
-	return new AsmExpr( maybeBuild< Expression >( inout ), constraint, maybeBuild< Expression >(operand) );
+	return new AsmExpr( maybeMoveBuild< Expression >( inout ), constraint, maybeMoveBuild< Expression >(operand) );
 }
 
 Expression *build_valexpr( StatementNode *s ) {
-	return new UntypedValofExpr( maybeBuild< Statement >(s), nullptr );
+	return new UntypedValofExpr( maybeMoveBuild< Statement >(s), nullptr );
 }
 Expression *build_typevalue( DeclarationNode *decl ) {
@@ -298,12 +297,12 @@
 	Declaration * newDecl = maybeBuild< Declaration >(decl_node); // compound literal type
 	if ( DeclarationWithType * newDeclWithType = dynamic_cast< DeclarationWithType * >( newDecl ) ) { // non-sue compound-literal type
-		return new CompoundLiteralExpr( newDeclWithType->get_type(), maybeBuild< Initializer >(kids) );
+		return new CompoundLiteralExpr( newDeclWithType->get_type(), maybeMoveBuild< Initializer >(kids) );
 	// these types do not have associated type information
 	} else if ( StructDecl * newDeclStructDecl = dynamic_cast< StructDecl * >( newDecl )  ) {
-		return new CompoundLiteralExpr( new StructInstType( Type::Qualifiers(), newDeclStructDecl->get_name() ), maybeBuild< Initializer >(kids) );
+		return new CompoundLiteralExpr( new StructInstType( Type::Qualifiers(), newDeclStructDecl->get_name() ), maybeMoveBuild< Initializer >(kids) );
 	} else if ( UnionDecl * newDeclUnionDecl = dynamic_cast< UnionDecl * >( newDecl )  ) {
-		return new CompoundLiteralExpr( new UnionInstType( Type::Qualifiers(), newDeclUnionDecl->get_name() ), maybeBuild< Initializer >(kids) );
+		return new CompoundLiteralExpr( new UnionInstType( Type::Qualifiers(), newDeclUnionDecl->get_name() ), maybeMoveBuild< Initializer >(kids) );
 	} else if ( EnumDecl * newDeclEnumDecl = dynamic_cast< EnumDecl * >( newDecl )  ) {
-		return new CompoundLiteralExpr( new EnumInstType( Type::Qualifiers(), newDeclEnumDecl->get_name() ), maybeBuild< Initializer >(kids) );
+		return new CompoundLiteralExpr( new EnumInstType( Type::Qualifiers(), newDeclEnumDecl->get_name() ), maybeMoveBuild< Initializer >(kids) );
 	} else {
 		assert( false );
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 7a5d773bef7683976cf576e842925087727665c2)
+++ src/Parser/ParseNode.h	(revision 7ecbb7e54482b80c60d085c0b42a0fff291198ce)
@@ -378,4 +378,11 @@
 void buildTypeList( const DeclarationNode *firstNode, std::list< Type * > &outputList );
 
+template< typename SynTreeType, typename NodeType >
+void buildMoveList( const NodeType *firstNode, std::list< SynTreeType * > &outputList ) {
+	buildList(firstNode, outputList);
+	delete firstNode;
+}
+
+
 #endif // PARSENODE_H
 
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision 7a5d773bef7683976cf576e842925087727665c2)
+++ src/Parser/StatementNode.cc	(revision 7ecbb7e54482b80c60d085c0b42a0fff291198ce)
@@ -62,5 +62,5 @@
 	StatementNode *node = dynamic_cast< StatementNode * >(prev);
 	std::list< Statement * > stmts;
-	buildList( stmt, stmts );
+	buildMoveList( stmt, stmts );
 	// splice any new Statements to end of current Statements
 	CaseStmt * caseStmt = dynamic_cast< CaseStmt * >(node->stmt);
@@ -70,5 +70,5 @@
 
 Statement *build_expr( ExpressionNode *ctl ) {
-	Expression *e = maybeBuild< Expression >( ctl );
+	Expression *e = maybeMoveBuild< Expression >( ctl );
 
 	if ( e )
@@ -81,5 +81,5 @@
 	Statement *thenb, *elseb = 0;
 	std::list< Statement * > branches;
-	buildList< Statement, StatementNode >( then_stmt, branches );
+	buildMoveList< Statement, StatementNode >( then_stmt, branches );
 	assert( branches.size() == 1 );
 	thenb = branches.front();
@@ -87,20 +87,20 @@
 	if ( else_stmt ) {
 		std::list< Statement * > branches;
-		buildList< Statement, StatementNode >( else_stmt, branches );
+		buildMoveList< Statement, StatementNode >( else_stmt, branches );
 		assert( branches.size() == 1 );
 		elseb = branches.front();
 	} // if
-	return new IfStmt( noLabels, notZeroExpr( maybeBuild< Expression >(ctl) ), thenb, elseb );
+	return new IfStmt( noLabels, notZeroExpr( maybeMoveBuild< Expression >(ctl) ), thenb, elseb );
 }
 
 Statement *build_switch( ExpressionNode *ctl, StatementNode *stmt ) {
 	std::list< Statement * > branches;
-	buildList< Statement, StatementNode >( stmt, branches );
+	buildMoveList< Statement, StatementNode >( stmt, branches );
 	assert( branches.size() >= 0 );						// size == 0 for switch (...) {}, i.e., no declaration or statements
-	return new SwitchStmt( noLabels, maybeBuild< Expression >(ctl), branches );
+	return new SwitchStmt( noLabels, maybeMoveBuild< Expression >(ctl), branches );
 }
 Statement *build_case( ExpressionNode *ctl ) {
 	std::list< Statement * > branches;
-	return new CaseStmt( noLabels, maybeBuild< Expression >(ctl), branches );
+	return new CaseStmt( noLabels, maybeMoveBuild< Expression >(ctl), branches );
 }
 Statement *build_default() {
@@ -111,26 +111,26 @@
 Statement *build_while( ExpressionNode *ctl, StatementNode *stmt, bool kind ) {
 	std::list< Statement * > branches;
-	buildList< Statement, StatementNode >( stmt, branches );
+	buildMoveList< Statement, StatementNode >( stmt, branches );
 	assert( branches.size() == 1 );
-	return new WhileStmt( noLabels, notZeroExpr( maybeBuild< Expression >(ctl) ), branches.front(), kind );
+	return new WhileStmt( noLabels, notZeroExpr( maybeMoveBuild< Expression >(ctl) ), branches.front(), kind );
 }
 
 Statement *build_for( ForCtl *forctl, StatementNode *stmt ) {
 	std::list< Statement * > branches;
-	buildList< Statement, StatementNode >( stmt, branches );
+	buildMoveList< Statement, StatementNode >( stmt, branches );
 	assert( branches.size() == 1 );
 
 	std::list< Statement * > init;
 	if ( forctl->init != 0 ) {
-		buildList( forctl->init, init );
+		buildMoveList( forctl->init, init );
 	} // if
 
 	Expression *cond = 0;
 	if ( forctl->condition != 0 )
-		cond = notZeroExpr( maybeBuild< Expression >(forctl->condition) );
+		cond = notZeroExpr( maybeMoveBuild< Expression >(forctl->condition) );
 
 	Expression *incr = 0;
 	if ( forctl->change != 0 )
-		incr = maybeBuild< Expression >(forctl->change);
+		incr = maybeMoveBuild< Expression >(forctl->change);
 
 	delete forctl;
@@ -142,15 +142,15 @@
 }
 Statement *build_computedgoto( ExpressionNode *ctl ) {
-	return new BranchStmt( noLabels, maybeBuild< Expression >(ctl), BranchStmt::Goto );
+	return new BranchStmt( noLabels, maybeMoveBuild< Expression >(ctl), BranchStmt::Goto );
 }
 
 Statement *build_return( ExpressionNode *ctl ) {
 	std::list< Expression * > exps;
-	buildList( ctl, exps );
+	buildMoveList( ctl, exps );
 	return new ReturnStmt( noLabels, exps.size() > 0 ? exps.back() : nullptr );
 }
 Statement *build_throw( ExpressionNode *ctl ) {
 	std::list< Expression * > exps;
-	buildList( ctl, exps );
+	buildMoveList( ctl, exps );
 	return new ReturnStmt( noLabels, exps.size() > 0 ? exps.back() : nullptr, true );
 }
@@ -158,19 +158,19 @@
 Statement *build_try( StatementNode *try_stmt, StatementNode *catch_stmt, StatementNode *finally_stmt ) {
 	std::list< Statement * > branches;
-	buildList< Statement, StatementNode >( catch_stmt, branches );
-	CompoundStmt *tryBlock = dynamic_cast< CompoundStmt * >(maybeBuild< Statement >(try_stmt));
+	buildMoveList< Statement, StatementNode >( catch_stmt, branches );
+	CompoundStmt *tryBlock = dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(try_stmt));
 	assert( tryBlock );
-	FinallyStmt *finallyBlock = dynamic_cast< FinallyStmt * >(maybeBuild< Statement >(finally_stmt) );
+	FinallyStmt *finallyBlock = dynamic_cast< FinallyStmt * >(maybeMoveBuild< Statement >(finally_stmt) );
 	return new TryStmt( noLabels, tryBlock, branches, finallyBlock );
 }
 Statement *build_catch( DeclarationNode *decl, StatementNode *stmt, bool catchAny ) {
 	std::list< Statement * > branches;
-	buildList< Statement, StatementNode >( stmt, branches );
+	buildMoveList< Statement, StatementNode >( stmt, branches );
 	assert( branches.size() == 1 );
-	return new CatchStmt( noLabels, maybeBuild< Declaration >(decl), branches.front(), catchAny );
+	return new CatchStmt( noLabels, maybeMoveBuild< Declaration >(decl), branches.front(), catchAny );
 }
 Statement *build_finally( StatementNode *stmt ) {
 	std::list< Statement * > branches;
-	buildList< Statement, StatementNode >( stmt, branches );
+	buildMoveList< Statement, StatementNode >( stmt, branches );
 	assert( branches.size() == 1 );
 	return new FinallyStmt( noLabels, dynamic_cast< CompoundStmt * >( branches.front() ) );
@@ -179,5 +179,5 @@
 Statement *build_compound( StatementNode *first ) {
 	CompoundStmt *cs = new CompoundStmt( noLabels );
-	buildList( first, cs->get_kids() );
+	buildMoveList( first, cs->get_kids() );
 	return cs;
 }
@@ -187,7 +187,7 @@
 	std::list< ConstantExpr * > clob;
 
-	buildList( output, out );
-	buildList( input, in );
-	buildList( clobber, clob );
+	buildMoveList( output, out );
+	buildMoveList( input, in );
+	buildMoveList( clobber, clob );
 	return new AsmStmt( noLabels, voltile, instruction, out, in, clob, gotolabels ? gotolabels->labels : noLabels );
 }
