Index: src/SymTab/Autogen.h
===================================================================
--- src/SymTab/Autogen.h	(revision 9939dc312f9fd40e9451c8c3c70ac5e68e233d16)
+++ src/SymTab/Autogen.h	(revision 288927fb785cee1734a981ead2c9a44f28ea7af6)
@@ -21,5 +21,4 @@
 
 #include "AST/Decl.hpp"
-#include "AST/Eval.hpp"
 #include "AST/Expr.hpp"
 #include "AST/Init.hpp"
@@ -71,6 +70,6 @@
 	template< typename OutIter >
 	ast::ptr< ast::Stmt > genCall(
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, const std::string & fname, OutIter && out, 
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, const std::string & fname, OutIter && out,
 		const ast::Type * type, const ast::Type * addCast, LoopDirection forward = LoopForward );
 
@@ -128,12 +127,12 @@
 	}
 
-	/// inserts into out a generated call expression to function fname with arguments dstParam and 
+	/// inserts into out a generated call expression to function fname with arguments dstParam and
 	/// srcParam. Should only be called with non-array types.
-	/// optionally returns a statement which must be inserted prior to the containing loop, if 
+	/// optionally returns a statement which must be inserted prior to the containing loop, if
 	/// there is one
 	template< typename OutIter >
-	ast::ptr< ast::Stmt > genScalarCall( 
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, std::string fname, OutIter && out, const ast::Type * type, 
+	ast::ptr< ast::Stmt > genScalarCall(
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, std::string fname, OutIter && out, const ast::Type * type,
 		const ast::Type * addCast = nullptr
 	) {
@@ -153,13 +152,13 @@
 
 		if ( addCast ) {
-			// cast to T& with qualifiers removed, so that qualified objects can be constructed and 
-			// destructed with the same functions as non-qualified objects. Unfortunately, lvalue 
-			// is considered a qualifier - for AddressExpr to resolve, its argument must have an 
+			// cast to T& with qualifiers removed, so that qualified objects can be constructed and
+			// destructed with the same functions as non-qualified objects. Unfortunately, lvalue
+			// is considered a qualifier - for AddressExpr to resolve, its argument must have an
 			// lvalue-qualified type, so remove all qualifiers except lvalue.
 			// xxx -- old code actually removed lvalue too...
 			ast::ptr< ast::Type > guard = addCast;  // prevent castType from mutating addCast
 			ast::ptr< ast::Type > castType = addCast;
-			ast::remove_qualifiers( 
-				castType, 
+			ast::remove_qualifiers(
+				castType,
 				ast::CV::Const | ast::CV::Volatile | ast::CV::Restrict | ast::CV::Atomic );
 			dstParam = new ast::CastExpr{ dstParam, new ast::ReferenceType{ castType } };
@@ -181,5 +180,5 @@
 
 		srcParam.clearArrayIndices();
-		
+
 		return listInit;
 	}
@@ -249,12 +248,12 @@
 	}
 
-	/// Store in out a loop which calls fname on each element of the array with srcParam and 
+	/// Store in out a loop which calls fname on each element of the array with srcParam and
 	/// dstParam as arguments. If forward is true, loop goes from 0 to N-1, else N-1 to 0
 	template< typename OutIter >
 	void genArrayCall(
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, const std::string & fname, OutIter && out, 
-		const ast::ArrayType * array, const ast::Type * addCast = nullptr, 
-		LoopDirection forward = LoopForward 
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, const std::string & fname, OutIter && out,
+		const ast::ArrayType * array, const ast::Type * addCast = nullptr,
+		LoopDirection forward = LoopForward
 	) {
 		static UniqueName indexName( "_index" );
@@ -279,6 +278,6 @@
 		} else {
 			// generate: for ( int i = N-1; i >= 0; --i )
-			begin = ast::call( 
-				loc, "?-?", array->dimension, ast::ConstantExpr::from_int( loc, 1 ) );
+			begin = ast::UntypedExpr::createCall( loc, "?-?",
+				{ array->dimension, ast::ConstantExpr::from_int( loc, 1 ) } );
 			end = ast::ConstantExpr::from_int( loc, 0 );
 			cmp = "?>=?";
@@ -286,16 +285,19 @@
 		}
 
-		ast::ptr< ast::DeclWithType > index = new ast::ObjectDecl{ 
-			loc, indexName.newName(), new ast::BasicType{ ast::BasicType::SignedInt }, 
+		ast::ptr< ast::DeclWithType > index = new ast::ObjectDecl{
+			loc, indexName.newName(), new ast::BasicType{ ast::BasicType::SignedInt },
 			new ast::SingleInit{ loc, begin } };
 		ast::ptr< ast::Expr > indexVar = new ast::VariableExpr{ loc, index };
-		
-		ast::ptr< ast::Expr > cond = ast::call( loc, cmp, indexVar, end );
-		
-		ast::ptr< ast::Expr > inc = ast::call( loc, update, indexVar );
-		
-		ast::ptr< ast::Expr > dstIndex = ast::call( loc, "?[?]", dstParam, indexVar );
-		
-		// srcParam must keep track of the array indices to build the source parameter and/or 
+
+		ast::ptr< ast::Expr > cond = ast::UntypedExpr::createCall(
+			loc, cmp, { indexVar, end } );
+
+		ast::ptr< ast::Expr > inc = ast::UntypedExpr::createCall(
+			loc, update, { indexVar } );
+
+		ast::ptr< ast::Expr > dstIndex = ast::UntypedExpr::createCall(
+			loc, "?[?]", { dstParam, indexVar } );
+
+		// srcParam must keep track of the array indices to build the source parameter and/or
 		// array list initializer
 		srcParam.addArrayIndex( indexVar, array->dimension );
@@ -303,8 +305,8 @@
 		// for stmt's body, eventually containing call
 		ast::CompoundStmt * body = new ast::CompoundStmt{ loc };
-		ast::ptr< ast::Stmt > listInit = genCall( 
-			srcParam, dstIndex, loc, fname, std::back_inserter( body->kids ), array->base, addCast, 
+		ast::ptr< ast::Stmt > listInit = genCall(
+			srcParam, dstIndex, loc, fname, std::back_inserter( body->kids ), array->base, addCast,
 			forward );
-		
+
 		// block containing the stmt and index variable
 		ast::CompoundStmt * block = new ast::CompoundStmt{ loc };
@@ -328,15 +330,15 @@
 	template< typename OutIter >
 	ast::ptr< ast::Stmt > genCall(
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, const std::string & fname, OutIter && out, 
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, const std::string & fname, OutIter && out,
 		const ast::Type * type, const ast::Type * addCast, LoopDirection forward
 	) {
 		if ( auto at = dynamic_cast< const ast::ArrayType * >( type ) ) {
-			genArrayCall( 
-				srcParam, dstParam, loc, fname, std::forward< OutIter >(out), at, addCast, 
+			genArrayCall(
+				srcParam, dstParam, loc, fname, std::forward< OutIter >(out), at, addCast,
 				forward );
 			return {};
 		} else {
-			return genScalarCall( 
+			return genScalarCall(
 				srcParam, dstParam, loc, fname, std::forward< OutIter >( out ), type, addCast );
 		}
@@ -377,8 +379,8 @@
 	}
 
-	static inline ast::ptr< ast::Stmt > genImplicitCall( 
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * obj, 
-		LoopDirection forward = LoopForward 
+	static inline ast::ptr< ast::Stmt > genImplicitCall(
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * obj,
+		LoopDirection forward = LoopForward
 	) {
 		// unnamed bit fields are not copied as they cannot be accessed
@@ -392,5 +394,5 @@
 
 		std::vector< ast::ptr< ast::Stmt > > stmts;
-		genCall( 
+		genCall(
 			srcParam, dstParam, loc, fname, back_inserter( stmts ), obj->type, addCast, forward );
 
@@ -400,5 +402,5 @@
 			const ast::Stmt * callStmt = stmts.front();
 			if ( addCast ) {
-				// implicitly generated ctor/dtor calls should be wrapped so that later passes are 
+				// implicitly generated ctor/dtor calls should be wrapped so that later passes are
 				// aware they were generated.
 				callStmt = new ast::ImplicitCtorDtorStmt{ callStmt->location, callStmt };
@@ -417,3 +419,2 @@
 // compile-command: "make install" //
 // End: //
-
