Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision 1f7dc61b5b760185c1c66c9315fb7f309173dba5)
+++ src/InitTweak/FixGlobalInit.cc	(revision 48a91e270c570a6f6635a022d7dfafbbd208229b)
@@ -113,9 +113,15 @@
 		accept_all(translationUnit, fixer);
 
+		// Say these magic declarations come at the end of the file.
+		CodeLocation const & location = translationUnit.decls.back()->location;
+
 		if ( !fixer.core.initStmts.empty() ) {
 			std::vector<ast::ptr<ast::Expr>> ctorParams;
-			if (inLibrary) ctorParams.emplace_back(ast::ConstantExpr::from_int({}, 200));
-			auto initFunction = new ast::FunctionDecl({}, "__global_init__", {}, {}, {}, new ast::CompoundStmt({}, std::move(fixer.core.initStmts)), 
-				ast::Storage::Static, ast::Linkage::C, {new ast::Attribute("constructor", std::move(ctorParams))});
+			if (inLibrary) ctorParams.emplace_back(ast::ConstantExpr::from_int(location, 200));
+			auto initFunction = new ast::FunctionDecl(location,
+				"__global_init__", {}, {}, {},
+				new ast::CompoundStmt(location, std::move(fixer.core.initStmts)),
+				ast::Storage::Static, ast::Linkage::C,
+				{new ast::Attribute("constructor", std::move(ctorParams))});
 
 			translationUnit.decls.emplace_back( initFunction );
@@ -124,7 +130,10 @@
 		if ( !fixer.core.destroyStmts.empty() ) {
 			std::vector<ast::ptr<ast::Expr>> dtorParams;
-			if (inLibrary) dtorParams.emplace_back(ast::ConstantExpr::from_int({}, 200));
-			auto destroyFunction = new ast::FunctionDecl({}, "__global_destroy__", {}, {}, {}, new ast::CompoundStmt({}, std::move(fixer.core.destroyStmts)), 
-				ast::Storage::Static, ast::Linkage::C, {new ast::Attribute("destructor", std::move(dtorParams))});
+			if (inLibrary) dtorParams.emplace_back(ast::ConstantExpr::from_int(location, 200));
+			auto destroyFunction = new ast::FunctionDecl( location,
+				"__global_destroy__", {}, {}, {},
+				new ast::CompoundStmt(location, std::move(fixer.core.destroyStmts)),
+				ast::Storage::Static, ast::Linkage::C,
+				{new ast::Attribute("destructor", std::move(dtorParams))});
 
 			translationUnit.decls.emplace_back(destroyFunction);
Index: src/InitTweak/FixInitNew.cpp
===================================================================
--- src/InitTweak/FixInitNew.cpp	(revision 1f7dc61b5b760185c1c66c9315fb7f309173dba5)
+++ src/InitTweak/FixInitNew.cpp	(revision 48a91e270c570a6f6635a022d7dfafbbd208229b)
@@ -16,4 +16,5 @@
 #include "CodeGen/GenType.h"           // for genPrettyType
 #include "CodeGen/OperatorTable.h"
+#include "Common/CodeLocationTools.hpp"
 #include "Common/PassVisitor.h"        // for PassVisitor, WithStmtsToAdd
 #include "Common/SemanticError.h"      // for SemanticError
@@ -553,5 +554,5 @@
 		ast::ptr<ast::Expr> guard = mutArg;
 
-		ast::ptr<ast::ObjectDecl> tmp = new ast::ObjectDecl({}, "__tmp", mutResult, nullptr );
+		ast::ptr<ast::ObjectDecl> tmp = new ast::ObjectDecl(loc, "__tmp", mutResult, nullptr );
 
 		// create and resolve copy constructor
@@ -799,14 +800,20 @@
 	// to prevent warnings ('_unq0' may be used uninitialized in this function),
 	// insert an appropriate zero initializer for UniqueExpr temporaries.
-	ast::Init * makeInit( const ast::Type * t ) {
+	ast::Init * makeInit( const ast::Type * t, CodeLocation const & loc ) {
 		if ( auto inst = dynamic_cast< const ast::StructInstType * >( t ) ) {
 			// initizer for empty struct must be empty
-			if ( inst->base->members.empty() ) return new ast::ListInit({}, {});
+			if ( inst->base->members.empty() ) {
+				return new ast::ListInit( loc, {} );
+			}
 		} else if ( auto inst = dynamic_cast< const ast::UnionInstType * >( t ) ) {
 			// initizer for empty union must be empty
-			if ( inst->base->members.empty() ) return new ast::ListInit({}, {});
-		}
-
-		return new ast::ListInit( {}, { new ast::SingleInit( {}, ast::ConstantExpr::from_int({}, 0) ) } );
+			if ( inst->base->members.empty() ) {
+				return new ast::ListInit( loc, {} );
+			}
+		}
+
+		return new ast::ListInit( loc, {
+			new ast::SingleInit( loc, ast::ConstantExpr::from_int( loc, 0 ) )
+		} );
 	}
 
@@ -832,5 +839,5 @@
 			} else {
 				// expr isn't a call expr, so create a new temporary variable to use to hold the value of the unique expression
-				mutExpr->object = new ast::ObjectDecl( mutExpr->location, toString("_unq", mutExpr->id), mutExpr->result, makeInit( mutExpr->result ) );
+				mutExpr->object = new ast::ObjectDecl( mutExpr->location, toString("_unq", mutExpr->id), mutExpr->result, makeInit( mutExpr->result, mutExpr->location ) );
 				mutExpr->var = new ast::VariableExpr( mutExpr->location, mutExpr->object );
 			}
@@ -1229,5 +1236,5 @@
 
 							auto destructor = new ast::ObjectDecl(loc, memberDtorNamer.newName(), new ast::StructInstType( ast::dtorStruct ), new ast::ListInit(loc, { new ast::SingleInit(loc, thisExpr ), new ast::SingleInit(loc, new ast::CastExpr( dtorExpr, dtorType ) ) } ) );
-							destructor->attributes.push_back( new ast::Attribute( "cleanup", { new ast::VariableExpr({}, ast::dtorStructDestroy ) } ) );
+							destructor->attributes.push_back( new ast::Attribute( "cleanup", { new ast::VariableExpr( loc, ast::dtorStructDestroy ) } ) );
 							mutStmts->push_front( new ast::DeclStmt(loc, destructor ) );
 							mutStmts->kids.splice( mutStmts->kids.begin(), stmtsToAdd );
@@ -1323,9 +1330,9 @@
 
 	const ast::Expr * GenStructMemberCalls::postvisit( const ast::UntypedExpr * untypedExpr ) {
-		// Expression * newExpr = untypedExpr;
 		// xxx - functions returning ast::ptr seems wrong...
 		auto res = ResolvExpr::findVoidExpression( untypedExpr, symtab );
-		return res.release();
-		// return newExpr;
+		// Fix CodeLocation (at least until resolver is fixed).
+		auto fix = localFillCodeLocations( untypedExpr->location, res.release() );
+		return strict_dynamic_cast<const ast::Expr *>( fix );
 	}
 
