Index: src/AST/Convert.cpp
===================================================================
--- src/AST/Convert.cpp	(revision 51ff2783e21d4811dcc780255c45aeaad2553805)
+++ src/AST/Convert.cpp	(revision e0016a502a6906a272ff601bf65e13c188c6148a)
@@ -358,6 +358,6 @@
 		for ( auto clause : node->clauses ) {
 			stmt->clauses.push_back({{
-					get<Expression>().accept1( clause.target.function ),
-					get<Expression>().acceptL( clause.target.arguments ),
+					get<Expression>().accept1( clause.target.func ),
+					get<Expression>().acceptL( clause.target.args ),
 				},
 				get<Statement>().accept1( clause.stmt ),
@@ -1260,5 +1260,5 @@
 	}
 
-	void convertInferUnion(ast::Expr::InferUnion               &newInferred, 
+	void convertInferUnion(ast::Expr::InferUnion               &newInferred,
 						   const std::map<UniqueId,ParamEntry> &oldInferParams,
 						   const std::vector<UniqueId>         &oldResnSlots) {
Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision 51ff2783e21d4811dcc780255c45aeaad2553805)
+++ src/AST/Pass.impl.hpp	(revision e0016a502a6906a272ff601bf65e13c188c6148a)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Pass.impl.hpp --
+// ast::Pass.impl.hpp --
 //
 // Author           : Thierry Delisle
@@ -121,5 +121,5 @@
 	template< typename pass_t >
 	template< typename node_t >
-	auto Pass< pass_t >::call_accept( const node_t * node )
+	auto ast::Pass< pass_t >::call_accept( const node_t * node )
 		-> typename std::enable_if<
 				!std::is_base_of<ast::Expr, node_t>::value &&
@@ -139,5 +139,5 @@
 
 	template< typename pass_t >
-	const ast::Expr * Pass< pass_t >::call_accept( const ast::Expr * expr ) {
+	const ast::Expr * ast::Pass< pass_t >::call_accept( const ast::Expr * expr ) {
 		__pedantic_pass_assert( __visit_children() );
 		__pedantic_pass_assert( expr );
@@ -152,5 +152,5 @@
 
 	template< typename pass_t >
-	const ast::Stmt * Pass< pass_t >::call_accept( const ast::Stmt * stmt ) {
+	const ast::Stmt * ast::Pass< pass_t >::call_accept( const ast::Stmt * stmt ) {
 		__pedantic_pass_assert( __visit_children() );
 		__pedantic_pass_assert( stmt );
@@ -204,5 +204,5 @@
 	template< typename pass_t >
 	template< template <class...> class container_t >
-	container_t< ptr<Stmt> > Pass< pass_t >::call_accept( const container_t< ptr<Stmt> > & statements ) {
+	container_t< ptr<Stmt> > ast::Pass< pass_t >::call_accept( const container_t< ptr<Stmt> > & statements ) {
 		__pedantic_pass_assert( __visit_children() );
 		if( statements.empty() ) return {};
@@ -270,5 +270,5 @@
 	template< typename pass_t >
 	template< template <class...> class container_t, typename node_t >
-	container_t< ast::ptr<node_t> > Pass< pass_t >::call_accept( const container_t< ast::ptr<node_t> > & container ) {
+	container_t< ast::ptr<node_t> > ast::Pass< pass_t >::call_accept( const container_t< ast::ptr<node_t> > & container ) {
 		__pedantic_pass_assert( __visit_children() );
 		if( container.empty() ) return {};
@@ -301,5 +301,5 @@
 	template< typename pass_t >
 	template<typename node_t, typename parent_t, typename child_t>
-	void Pass< pass_t >::maybe_accept(
+	void ast::Pass< pass_t >::maybe_accept(
 		const node_t * & parent,
 		child_t parent_t::*child
@@ -835,4 +835,37 @@
 		// }
 
+	VISIT({
+		std::vector<WaitForStmt::Clause> new_clauses;
+		new_clauses.reserve( node->clauses.size() );
+		bool mutated = false;
+		for( const auto & clause : node->clauses ) {
+
+			Expr * func = clause.target.func ? clause.target.func->accept(*this) : nullptr;
+			if(func != clause.target.func) mutated = true;
+
+			std::vector<ptr<Expr>> new_args;
+			new_args.reserve(clause.target.args.size());
+			for( const auto & arg : clause.target.args ) {
+				auto a = arg->accept(*this);
+				new_args.push_back( a );
+				if( a != arg ) mutated = true;
+			}
+
+			Stmt * stmt = clause.stmt ? clause.stmt->accept(*this) : nullptr;
+			if(stmt != clause.stmt) mutated = true;
+
+			Expr * cond = clause.cond ? clause.cond->accept(*this) : nullptr;
+			if(cond != clause.cond) mutated = true;
+
+			new_clauses.push_back( WaitForStmt::Clause{ {func, std::move(new_args) }, stmt, cond } );
+		}
+
+		if(mutated) {
+			auto n = mutate(node);
+			n->clauses = std::move( new_clauses );
+			node = n;
+		}
+	})
+
 	#define maybe_accept(field) \
 		if(node->field) { \
@@ -1558,6 +1591,242 @@
 }
 
-
-
+//--------------------------------------------------------------------------
+// VoidType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::VoidType * node ) {
+	VISIT_START( node );
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// BasicType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::BasicType * node ) {
+	VISIT_START( node );
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// PointerType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::PointerType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		// xxx - should PointerType visit/mutate dimension?
+		maybe_accept( node, &PointerType::base );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// ArrayType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::ArrayType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &ArrayType::dimension );
+		maybe_accept( node, &ArrayType::base );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// ReferenceType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::ReferenceType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &ReferenceType::base );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// QualifiedType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::QualifiedType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &QualifiedType::parent );
+		maybe_accept( node, &QualifiedType::child );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// FunctionType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::FunctionType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &FunctionType::forall  );
+		maybe_accept( node, &FunctionType::returns );
+		maybe_accept( node, &FunctionType::params  );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// StructInstType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::StructInstType * node ) {
+	VISIT_START( node );
+
+	__pass::indexer::addStruct( node->name, 0, pass );
+
+	VISIT({
+		guard_indexer guard { *this };
+		maybe_accept( node, &StructInstType::forall );
+		maybe_accept( node, &StructInstType::params );
+	})
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// UnionInstType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::UnionInstType * node ) {
+	VISIT_START( node );
+
+	__pass::indexer::addStruct( node->name, 0, pass );
+
+	{
+		guard_indexer guard { *this };
+		maybe_accept( node, &UnionInstType::forall );
+		maybe_accept( node, &UnionInstType::params );
+	}
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// EnumInstType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::EnumInstType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &EnumInstType::forall );
+		maybe_accept( node, &EnumInstType::params );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// TraitInstType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::TraitInstType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &TraitInstType::forall );
+		maybe_accept( node, &TraitInstType::params );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// TypeInstType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::TypeInstType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &TypeInstType::forall );
+		maybe_accept( node, &TypeInstType::params );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// TupleType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::TupleType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &TupleType::types );
+		maybe_accept( node, &TupleType::members );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// TypeofType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::TypeofType * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &TypeofType::expr );
+	)
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// VarArgsType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::VarArgsType * node ) {
+	VISIT_START( node );
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// ZeroType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::ZeroType * node ) {
+	VISIT_START( node );
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// OneType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::OneType * node ) {
+	VISIT_START( node );
+
+	VISIT_END( Type, node );
+}
+
+//--------------------------------------------------------------------------
+// GlobalScopeType
+template< typename pass_t >
+const ast::Type * ast::Pass< pass_t >::visit( const ast::GlobalScopeType * node ) {
+	VISIT_START( node );
+
+	VISIT_END( Type, node );
+}
+
+
+//--------------------------------------------------------------------------
+// Designation
+template< typename pass_t >
+const ast::Designation * ast::Pass< pass_t >::visit( const ast::Designation * node ) {
+	VISIT_START( node );
+
+	VISIT( maybe_accept( node, &Designation::designators ); )
+
+	VISIT_END( Designation, node );
+}
 
 //--------------------------------------------------------------------------
Index: src/AST/Stmt.hpp
===================================================================
--- src/AST/Stmt.hpp	(revision 51ff2783e21d4811dcc780255c45aeaad2553805)
+++ src/AST/Stmt.hpp	(revision e0016a502a6906a272ff601bf65e13c188c6148a)
@@ -330,6 +330,6 @@
 public:
 	struct Target {
-		ptr<Expr> function;
-		std::vector<ptr<Expr>> arguments;
+		ptr<Expr> func;
+		std::vector<ptr<Expr>> args;
 	};
 
