Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision c1ed2eed49812bcfa4987e47ccc9eda7d2fbf8c0)
+++ src/InitTweak/InitTweak.cc	(revision ce12e2b15f088274daa97c991566ae160ca9a8fa)
@@ -318,5 +318,5 @@
 	virtual ~ExpanderImpl() = default;
 	virtual std::vector< ast::ptr< ast::Expr > > next( IndexList & indices ) = 0;
-	virtual ast::ptr< ast::Stmt > buildListInit( 
+	virtual ast::ptr< ast::Stmt > buildListInit(
 		ast::UntypedExpr * callExpr, IndexList & indices ) = 0;
 };
@@ -324,13 +324,13 @@
 namespace {
 	template< typename Out >
-	void buildCallExpr( 
-		ast::UntypedExpr * callExpr, const ast::Expr * index, const ast::Expr * dimension, 
+	void buildCallExpr(
+		ast::UntypedExpr * callExpr, const ast::Expr * index, const ast::Expr * dimension,
 		const ast::Init * init, Out & out
 	) {
 		const CodeLocation & loc = init->location;
 
-		auto cond = new ast::UntypedExpr{ 
+		auto cond = new ast::UntypedExpr{
 			loc, new ast::NameExpr{ loc, "?<?" }, { index, dimension } };
-		
+
 		std::vector< ast::ptr< ast::Expr > > args = makeInitList( init );
 		splice( callExpr->args, args );
@@ -338,5 +338,5 @@
 		out.emplace_back( new ast::IfStmt{ loc, cond, new ast::ExprStmt{ loc, callExpr } } );
 
-		out.emplace_back( new ast::ExprStmt{ 
+		out.emplace_back( new ast::ExprStmt{
 			loc, new ast::UntypedExpr{ loc, new ast::NameExpr{ loc, "++?" }, { index } } } );
 	}
@@ -344,5 +344,5 @@
 	template< typename Out >
 	void build(
-		ast::UntypedExpr * callExpr, const InitExpander_new::IndexList & indices, 
+		ast::UntypedExpr * callExpr, const InitExpander_new::IndexList & indices,
 		const ast::Init * init, Out & out
 	) {
@@ -371,7 +371,7 @@
 
 			static UniqueName targetLabel( "L__autogen__" );
-			ast::Label switchLabel{ 
+			ast::Label switchLabel{
 				loc, targetLabel.newName(), { new ast::Attribute{ "unused" } } };
-			
+
 			std::vector< ast::ptr< ast::Stmt > > branches;
 			for ( const ast::Init * init : *listInit ) {
@@ -381,5 +381,5 @@
 				std::vector< ast::ptr< ast::Stmt > > stmts;
 				build( callExpr, indices, init, stmts );
-				stmts.emplace_back( 
+				stmts.emplace_back(
 					new ast::BranchStmt{ loc, ast::BranchStmt::Break, switchLabel } );
 				branches.emplace_back( new ast::CaseStmt{ loc, condition, std::move( stmts ) } );
@@ -398,12 +398,12 @@
 			return makeInitList( init );
 		}
-		
-		ast::ptr< ast::Stmt > buildListInit( 
-			ast::UntypedExpr * callExpr, InitExpander_new::IndexList & indices 
+
+		ast::ptr< ast::Stmt > buildListInit(
+			ast::UntypedExpr * callExpr, InitExpander_new::IndexList & indices
 		) override {
-			// If array came with an initializer list, initialize each element. We may have more 
-			// initializers than elements of the array; need to check at each index that we have 
-			// not exceeded size. We may have fewer initializers than elements in the array; need 
-			// to default-construct remaining elements. To accomplish this, generate switch 
+			// If array came with an initializer list, initialize each element. We may have more
+			// initializers than elements of the array; need to check at each index that we have
+			// not exceeded size. We may have fewer initializers than elements in the array; need
+			// to default-construct remaining elements. To accomplish this, generate switch
 			// statement consuming all of expander's elements
 
@@ -427,6 +427,6 @@
 		ExprImpl_new( const ast::Expr * a ) : arg( a ) {}
 
-		std::vector< ast::ptr< ast::Expr > > next( 
-			InitExpander_new::IndexList & indices 
+		std::vector< ast::ptr< ast::Expr > > next(
+			InitExpander_new::IndexList & indices
 		) override {
 			if ( ! arg ) return {};
@@ -437,13 +437,13 @@
 				// go through indices and layer on subscript exprs ?[?]
 				++it;
-				expr = new ast::UntypedExpr{ 
+				expr = new ast::UntypedExpr{
 					loc, new ast::NameExpr{ loc, "?[?]" }, { expr, *it } };
 			}
 			return { expr };
 		}
-		
-		ast::ptr< ast::Stmt > buildListInit( 
-			ast::UntypedExpr *, InitExpander_new::IndexList & 
-		) override { 
+
+		ast::ptr< ast::Stmt > buildListInit(
+			ast::UntypedExpr *, InitExpander_new::IndexList &
+		) override {
 			return {};
 		}
@@ -464,5 +464,5 @@
 }
 
-/// builds statement which has the same semantics as a C-style list initializer (for array 
+/// builds statement which has the same semantics as a C-style list initializer (for array
 /// initializers) using callExpr as the base expression to perform initialization
 ast::ptr< ast::Stmt > InitExpander_new::buildListInit( ast::UntypedExpr * callExpr ) {
@@ -668,9 +668,9 @@
 
 		const ast::DeclWithType * func = getCalledFunction( appExpr->func );
-		assertf( func, 
+		assertf( func,
 			"getCalledFunction returned nullptr: %s", toString( appExpr->func ).c_str() );
-		
-		// check for Intrinsic only -- don't want to remove all overridable ctor/dtor because 
-		// autogenerated ctor/dtor will call all member dtors, and some members may have a 
+
+		// check for Intrinsic only -- don't want to remove all overridable ctor/dtor because
+		// autogenerated ctor/dtor will call all member dtors, and some members may have a
 		// user-defined dtor
 		return func->linkage == ast::Linkage::Intrinsic ? appExpr : nullptr;
@@ -707,5 +707,5 @@
 		return allofCtorDtor( stmt, []( const ast::Expr * callExpr ){
 			if ( const ast::ApplicationExpr * appExpr = isIntrinsicCallExpr( callExpr ) ) {
-				const ast::FunctionType * funcType = 
+				const ast::FunctionType * funcType =
 					GenPoly::getFunctionType( appExpr->func->result );
 				assert( funcType );
@@ -997,6 +997,6 @@
 	bool isCtorDtorAssign( const std::string & str ) { return isCtorDtor( str ) || isAssignment( str ); }
 
-	FunctionDecl * isCopyFunction( Declaration * decl, const std::string & fname ) {
-		FunctionDecl * function = dynamic_cast< FunctionDecl * >( decl );
+	const FunctionDecl * isCopyFunction( const Declaration * decl, const std::string & fname ) {
+		const FunctionDecl * function = dynamic_cast< const FunctionDecl * >( decl );
 		if ( ! function ) return nullptr;
 		if ( function->name != fname ) return nullptr;
@@ -1022,20 +1022,20 @@
 		if ( ! t1 ) return false;
 		const ast::Type * t2 = ftype->params.back()->get_type();
-		
+
 		return ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, ast::SymbolTable{} );
 	}
 
-	FunctionDecl * isAssignment( Declaration * decl ) {
+	const FunctionDecl * isAssignment( const Declaration * decl ) {
 		return isCopyFunction( decl, "?=?" );
 	}
-	FunctionDecl * isDestructor( Declaration * decl ) {
-		if ( isDestructor( decl->get_name() ) ) {
-			return dynamic_cast< FunctionDecl * >( decl );
+	const FunctionDecl * isDestructor( const Declaration * decl ) {
+		if ( isDestructor( decl->name ) ) {
+			return dynamic_cast< const FunctionDecl * >( decl );
 		}
 		return nullptr;
 	}
-	FunctionDecl * isDefaultConstructor( Declaration * decl ) {
+	const FunctionDecl * isDefaultConstructor( const Declaration * decl ) {
 		if ( isConstructor( decl->name ) ) {
-			if ( FunctionDecl * func = dynamic_cast< FunctionDecl * >( decl ) ) {
+			if ( const FunctionDecl * func = dynamic_cast< const FunctionDecl * >( decl ) ) {
 				if ( func->type->parameters.size() == 1 ) {
 					return func;
@@ -1045,5 +1045,5 @@
 		return nullptr;
 	}
-	FunctionDecl * isCopyConstructor( Declaration * decl ) {
+	const FunctionDecl * isCopyConstructor( const Declaration * decl ) {
 		return isCopyFunction( decl, "?{}" );
 	}
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision c1ed2eed49812bcfa4987e47ccc9eda7d2fbf8c0)
+++ src/InitTweak/InitTweak.h	(revision ce12e2b15f088274daa97c991566ae160ca9a8fa)
@@ -26,9 +26,9 @@
 // helper functions for initialization
 namespace InitTweak {
-	FunctionDecl * isAssignment( Declaration * decl );
-	FunctionDecl * isDestructor( Declaration * decl );
-	FunctionDecl * isDefaultConstructor( Declaration * decl );
-	FunctionDecl * isCopyConstructor( Declaration * decl );
-	FunctionDecl * isCopyFunction( Declaration * decl, const std::string & fname );
+	const FunctionDecl * isAssignment( const Declaration * decl );
+	const FunctionDecl * isDestructor( const Declaration * decl );
+	const FunctionDecl * isDefaultConstructor( const Declaration * decl );
+	const FunctionDecl * isCopyConstructor( const Declaration * decl );
+	const FunctionDecl * isCopyFunction( const Declaration * decl, const std::string & fname );
 	bool isCopyFunction( const ast::FunctionDecl * decl );
 
@@ -153,6 +153,6 @@
 		InitExpander_new & operator++ ();
 
-		/// builds statement which has the same semantics as a C-style list initializer (for array 
-		/// initializers) using callExpr as the base expression to perform initialization. 
+		/// builds statement which has the same semantics as a C-style list initializer (for array
+		/// initializers) using callExpr as the base expression to perform initialization.
 		/// Mutates callExpr
 		ast::ptr< ast::Stmt > buildListInit( ast::UntypedExpr * callExpr );
