Index: src/Common/PassVisitor.h
===================================================================
--- src/Common/PassVisitor.h	(revision d55d7a68246b165aeaa9e161109032ddd07146d8)
+++ src/Common/PassVisitor.h	(revision 7c782aff4b836a71e18dd75c37d3b3e43582a5bc)
@@ -121,4 +121,5 @@
 	virtual void visit( UntypedInitExpr *  initExpr ) override final;
 	virtual void visit( InitExpr *  initExpr ) override final;
+	virtual void visit( DeletedExpr *  delExpr ) override final;
 
 	virtual void visit( VoidType * basicType ) override final;
@@ -215,4 +216,5 @@
 	virtual Expression * mutate( UntypedInitExpr *  initExpr ) override final;
 	virtual Expression * mutate( InitExpr *  initExpr ) override final;
+	virtual Expression * mutate( DeletedExpr *  delExpr ) override final;
 
 	virtual Type * mutate( VoidType * basicType ) override final;
@@ -303,5 +305,5 @@
 	void indexerAddUnionFwd ( UnionDecl                 * node  ) { indexer_impl_addUnionFwd ( pass, 0, node ); }
 	void indexerAddTrait    ( TraitDecl                 * node  ) { indexer_impl_addTrait    ( pass, 0, node ); }
-	void indexerAddWith     ( std::list< Expression * > & exprs ) { indexer_impl_addWith     ( pass, 0, exprs ); }
+	void indexerAddWith     ( std::list< Expression * > & exprs, BaseSyntaxNode * withStmt ) { indexer_impl_addWith     ( pass, 0, exprs, withStmt ); }
 
 
Index: src/Common/PassVisitor.impl.h
===================================================================
--- src/Common/PassVisitor.impl.h	(revision d55d7a68246b165aeaa9e161109032ddd07146d8)
+++ src/Common/PassVisitor.impl.h	(revision 7c782aff4b836a71e18dd75c37d3b3e43582a5bc)
@@ -393,5 +393,5 @@
 		// shadow with exprs and not the other way around.
 		auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
-		indexerAddWith( node->withExprs );
+		indexerAddWith( node->withExprs, node );
 		{
 			auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
@@ -423,5 +423,5 @@
 		// shadow with exprs and not the other way around.
 		auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
-		indexerAddWith( node->withExprs );
+		indexerAddWith( node->withExprs, node );
 		{
 			auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
@@ -1064,5 +1064,5 @@
 		// catch statements introduce a level of scope (for the caught exception)
 		auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
-		indexerAddWith( node->exprs );
+		indexerAddWith( node->exprs, node );
 		maybeAccept_impl( node->stmt, *this );
 	}
@@ -1077,5 +1077,5 @@
 		// catch statements introduce a level of scope (for the caught exception)
 		auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
-		indexerAddWith( node->exprs );
+		indexerAddWith( node->exprs, node );
 		maybeMutate_impl( node->stmt, *this );
 	}
@@ -1971,4 +1971,29 @@
 }
 
+//--------------------------------------------------------------------------
+// DeletedExpr
+template< typename pass_type >
+void PassVisitor< pass_type >::visit( DeletedExpr * node ) {
+	VISIT_START( node );
+
+	indexerScopedAccept( node->result, *this );
+	maybeAccept_impl( node->expr, *this );
+	// don't visit deleteStmt, because it is a pointer to somewhere else in the tree.
+
+	VISIT_END( node );
+}
+
+template< typename pass_type >
+Expression * PassVisitor< pass_type >::mutate( DeletedExpr * node ) {
+	MUTATE_START( node );
+
+	indexerScopedMutate( node->env, *this );
+	indexerScopedMutate( node->result, *this );
+	maybeMutate_impl( node->expr, *this );
+
+	MUTATE_END( Expression, node );
+}
+
+
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( VoidType * node ) {
Index: src/Common/PassVisitor.proto.h
===================================================================
--- src/Common/PassVisitor.proto.h	(revision d55d7a68246b165aeaa9e161109032ddd07146d8)
+++ src/Common/PassVisitor.proto.h	(revision 7c782aff4b836a71e18dd75c37d3b3e43582a5bc)
@@ -193,5 +193,5 @@
 
 
-#define INDEXER_FUNC( func, type )                                                                                             \
+#define INDEXER_FUNC1( func, type )                                                                                             \
 template<typename pass_type>                                                                                                   \
 static inline auto indexer_impl_##func ( pass_type & pass, int, type arg ) -> decltype( pass.indexer.func( arg ), void() ) {   \
@@ -202,11 +202,21 @@
 static inline void indexer_impl_##func ( pass_type &, long, type ) { }                                                          \
 
-INDEXER_FUNC( addId     , DeclarationWithType *       );
-INDEXER_FUNC( addType   , NamedTypeDecl *             );
-INDEXER_FUNC( addStruct , StructDecl *                );
-INDEXER_FUNC( addEnum   , EnumDecl *                  );
-INDEXER_FUNC( addUnion  , UnionDecl *                 );
-INDEXER_FUNC( addTrait  , TraitDecl *                 );
-INDEXER_FUNC( addWith   , std::list< Expression * > & );
+#define INDEXER_FUNC2( func, type1, type2 )                                                                                             \
+template<typename pass_type>                                                                                                   \
+static inline auto indexer_impl_##func ( pass_type & pass, int, type1 arg1, type2 arg2 ) -> decltype( pass.indexer.func( arg1, arg2 ), void() ) {   \
+	pass.indexer.func( arg1, arg2 );                                                                                                \
+}                                                                                                                              \
+                                                                                                                               \
+template<typename pass_type>                                                                                                   \
+static inline void indexer_impl_##func ( pass_type &, long, type1, type2 ) { }
+
+
+INDEXER_FUNC1( addId     , DeclarationWithType *       );
+INDEXER_FUNC1( addType   , NamedTypeDecl *             );
+INDEXER_FUNC1( addStruct , StructDecl *                );
+INDEXER_FUNC1( addEnum   , EnumDecl *                  );
+INDEXER_FUNC1( addUnion  , UnionDecl *                 );
+INDEXER_FUNC1( addTrait  , TraitDecl *                 );
+INDEXER_FUNC2( addWith   , std::list< Expression * > &, BaseSyntaxNode * );
 
 
Index: src/Common/utility.h
===================================================================
--- src/Common/utility.h	(revision d55d7a68246b165aeaa9e161109032ddd07146d8)
+++ src/Common/utility.h	(revision 7c782aff4b836a71e18dd75c37d3b3e43582a5bc)
@@ -98,4 +98,14 @@
 }
 
+template< typename SrcContainer, typename DestContainer, typename Predicate >
+void cloneAll_if( const SrcContainer &src, DestContainer &dest, Predicate pred ) {
+	std::back_insert_iterator< DestContainer > out( dest );
+	for ( auto x : src ) {
+		if ( pred(x) ) {
+			*out++ = x->clone();
+		}
+	} // while
+}
+
 template< typename Container >
 void assertAll( const Container &container ) {
