Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision bf1ee05002b42073ed8a65565fc4529b31d05f79)
+++ src/InitTweak/InitTweak.cc	(revision bf1ee05002b42073ed8a65565fc4529b31d05f79)
@@ -0,0 +1,85 @@
+#include "InitTweak.h"
+#include "SynTree/Visitor.h"
+#include "SynTree/Statement.h"
+#include "SynTree/Initializer.h"
+#include "SynTree/Expression.h"
+#include "GenPoly/GenPoly.h"
+
+namespace InitTweak {
+  namespace {
+    class HasDesignations : public Visitor {
+    public:
+      bool hasDesignations = false;
+      template<typename Init>
+      void handleInit( Init * init ) {
+        if ( ! init->get_designators().empty() ) hasDesignations = true;
+        else Visitor::visit( init );
+      }
+      virtual void visit( SingleInit * singleInit ) { handleInit( singleInit); }
+      virtual void visit( ListInit * listInit ) { handleInit( listInit); }
+    };
+
+    class InitExpander : public Visitor {
+      public:
+      InitExpander() {}
+      virtual void visit( SingleInit * singleInit );
+      virtual void visit( ListInit * listInit );
+      std::list< Expression * > argList;
+    };
+
+    void InitExpander::visit( SingleInit * singleInit ) {
+      argList.push_back( singleInit->get_value()->clone() );
+    }
+
+    void InitExpander::visit( ListInit * listInit ) {
+      // xxx - for now, assume no nested list inits
+      std::list<Initializer*>::iterator it = listInit->begin_initializers();
+      for ( ; it != listInit->end_initializers(); ++it ) {
+        (*it)->accept( *this );
+      }
+    }
+  }
+
+  std::list< Expression * > makeInitList( Initializer * init ) {
+    InitExpander expander;
+    maybeAccept( init, expander );
+    return expander.argList;
+  }
+
+  bool isDesignated( Initializer * init ) {
+    HasDesignations finder;
+    maybeAccept( init, finder );
+    return finder.hasDesignations;
+  }
+
+  bool tryConstruct( ObjectDecl * objDecl ) {
+    return ! LinkageSpec::isBuiltin( objDecl->get_linkage() ) &&
+      (objDecl->get_init() == NULL ||
+        ( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() )) &&
+      ! isDesignated( objDecl->get_init() );
+  }
+
+  bool isInstrinsicSingleArgCallStmt( Statement * stmt ) {
+    if ( stmt == NULL ) return false;
+    if ( ExprStmt * exprStmt = dynamic_cast< ExprStmt * >( stmt ) ) {
+      ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( exprStmt->get_expr() );
+      assert( appExpr );
+      VariableExpr * function = dynamic_cast< VariableExpr * >( appExpr->get_function() );
+      assert( function );
+      // check for Intrinsic only - don't want to remove all overridable ctor/dtors because autogenerated ctor/dtor
+      // will call all member dtors, and some members may have a user defined dtor.
+      FunctionType * funcType = GenPoly::getFunctionType( function->get_var()->get_type() );
+      assert( funcType );
+      return function->get_var()->get_linkage() == LinkageSpec::Intrinsic && funcType->get_parameters().size() == 1;
+    } else if ( CompoundStmt * compoundStmt = dynamic_cast< CompoundStmt * >( stmt ) ) {
+      // could also be a compound statement with a loop, in the case of an array
+      assert( compoundStmt->get_kids().size() == 2 ); // loop variable and loop
+      ForStmt * forStmt = dynamic_cast< ForStmt * >( compoundStmt->get_kids().back() );
+      assert( forStmt && forStmt->get_body() );
+      return isInstrinsicSingleArgCallStmt( forStmt->get_body() );
+    } else {
+      // should never get here
+      assert( false && "encountered unknown call statement" );
+    }
+  }
+}
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision bf1ee05002b42073ed8a65565fc4529b31d05f79)
+++ src/InitTweak/InitTweak.h	(revision bf1ee05002b42073ed8a65565fc4529b31d05f79)
@@ -0,0 +1,49 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// RemoveInit.h --
+//
+// Author           : Rob Schluntz
+// Created On       : Fri May 13 11:26:36 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Fri May 13 11:35:36 2016
+// Update Count     : 3
+//
+
+#ifndef INIT_TWEAK_H
+#define INIT_TWEAK_H
+
+#include <string>
+#include <list>
+
+#include "SynTree/SynTree.h"
+#include "SynTree/Declaration.h"
+#include "SynTree/Mutator.h"
+
+// helper functions for initialization
+namespace InitTweak {
+  /// transform Initializer into an argument list that can be passed to a call expression
+  std::list< Expression * > makeInitList( Initializer * init );
+
+  /// True if the resolver should try to construct objDecl
+  bool tryConstruct( ObjectDecl * objDecl );
+
+  /// True if the Initializer contains designations
+  bool isDesignated( Initializer * init );
+
+  /// True if stmt is a call statement where the function called is intrinsic and takes one parameter.
+  /// Intended to be used for default ctor/dtor calls, but might have use elsewhere.
+  /// Currently has assertions that make it less than fully general.
+  bool isInstrinsicSingleArgCallStmt( Statement * expr );
+} // namespace
+
+#endif // INITTWEAK_GENINIT_H
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
