Index: src/SymTab/Autogen.cc
===================================================================
--- src/SymTab/Autogen.cc	(revision 8d7bef249652cc2b9854c7090c758bcd9ad9f613)
+++ src/SymTab/Autogen.cc	(revision bd06384ff9b3300e1d878bc19523e6051209bb15)
@@ -588,7 +588,7 @@
 		// must visit children (enum constants) to add them to the indexer
 		if ( enumDecl->has_body() ) {
-			EnumInstType enumInst( Type::Qualifiers(), enumDecl->get_name() );
-			enumInst.set_baseEnum( enumDecl );
-			EnumFuncGenerator gen( &enumInst, data, functionNesting, indexer );
+			auto enumInst = new EnumInstType{ Type::Qualifiers(), enumDecl->get_name() };
+			enumInst->set_baseEnum( enumDecl );
+			EnumFuncGenerator gen( enumInst, data, functionNesting, indexer );
 			generateFunctions( gen, declsToAddAfter );
 		}
@@ -598,10 +598,10 @@
 		visit_children = false;
 		if ( structDecl->has_body() ) {
-			StructInstType structInst( Type::Qualifiers(), structDecl->name );
-			structInst.set_baseStruct( structDecl );
+			auto structInst = new StructInstType{ Type::Qualifiers(), structDecl->name };
+			structInst->set_baseStruct( structDecl );
 			for ( TypeDecl * typeDecl : structDecl->parameters ) {
-				structInst.parameters.push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->name, typeDecl ) ) );
-			}
-			StructFuncGenerator gen( structDecl, &structInst, data, functionNesting, indexer );
+				structInst->parameters.push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->name, typeDecl ) ) );
+			}
+			StructFuncGenerator gen( structDecl, structInst, data, functionNesting, indexer );
 			generateFunctions( gen, declsToAddAfter );
 		} // if
@@ -611,10 +611,10 @@
 		visit_children = false;
 		if ( unionDecl->has_body()  ) {
-			UnionInstType unionInst( Type::Qualifiers(), unionDecl->get_name() );
-			unionInst.set_baseUnion( unionDecl );
+			auto unionInst = new UnionInstType{ Type::Qualifiers(), unionDecl->get_name() };
+			unionInst->set_baseUnion( unionDecl );
 			for ( TypeDecl * typeDecl : unionDecl->get_parameters() ) {
-				unionInst.get_parameters().push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), typeDecl ) ) );
-			}
-			UnionFuncGenerator gen( unionDecl, &unionInst, data, functionNesting, indexer );
+				unionInst->get_parameters().push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), typeDecl ) ) );
+			}
+			UnionFuncGenerator gen( unionDecl, unionInst, data, functionNesting, indexer );
 			generateFunctions( gen, declsToAddAfter );
 		} // if
@@ -625,6 +625,6 @@
 		if ( ! typeDecl->base ) return;
 
-		TypeInstType refType( Type::Qualifiers(), typeDecl->name, typeDecl );
-		TypeFuncGenerator gen( typeDecl, &refType, data, functionNesting, indexer );
+		auto refType = new TypeInstType{ Type::Qualifiers(), typeDecl->name, typeDecl };
+		TypeFuncGenerator gen( typeDecl, refType, data, functionNesting, indexer );
 		generateFunctions( gen, declsToAddAfter );
 
