Index: src/ResolvExpr/AdjustExprType.cc
===================================================================
--- src/ResolvExpr/AdjustExprType.cc	(revision 7870799883ca946218c97fb6a189d1da90a16e8e)
+++ src/ResolvExpr/AdjustExprType.cc	(revision ef5b8288bd2be4816de42f8ea6a9b3d5e5971b31)
@@ -47,7 +47,7 @@
 		void premutate( OneType * ) { visit_children = false; }
 
-		Type * postmutate( ArrayType *arrayType );
-		Type * postmutate( FunctionType *functionType );
-		Type * postmutate( TypeInstType *aggregateUseType );
+		Type * postmutate( ArrayType * arrayType );
+		Type * postmutate( FunctionType * functionType );
+		Type * postmutate( TypeInstType * aggregateUseType );
 
 		private:
@@ -61,5 +61,5 @@
 
 	Type * AdjustExprType_old::postmutate( ArrayType * arrayType ) {
-		PointerType *pointerType = new PointerType{ arrayType->get_qualifiers(), arrayType->base };
+		PointerType * pointerType = new PointerType{ arrayType->get_qualifiers(), arrayType->base };
 		arrayType->base = nullptr;
 		delete arrayType;
@@ -72,10 +72,10 @@
 
 	Type * AdjustExprType_old::postmutate( TypeInstType * typeInst ) {
-		if ( const EqvClass* eqvClass = env.lookup( typeInst->get_name() ) ) {
+		if ( const EqvClass * eqvClass = env.lookup( typeInst->get_name() ) ) {
 			if ( eqvClass->data.kind == TypeDecl::Ftype ) {
 				return new PointerType{ Type::Qualifiers(), typeInst };
 			}
-		} else if ( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) {
-			if ( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) {
+		} else if ( const NamedTypeDecl * ntDecl = indexer.lookupType( typeInst->get_name() ) ) {
+			if ( const TypeDecl * tyDecl = dynamic_cast< const TypeDecl * >( ntDecl ) ) {
 				if ( tyDecl->get_kind() == TypeDecl::Ftype ) {
 					return new PointerType{ Type::Qualifiers(), typeInst };
@@ -89,5 +89,5 @@
 void adjustExprType( Type *&type, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
 	PassVisitor<AdjustExprType_old> adjuster( env, indexer );
-	Type *newType = type->acceptMutator( adjuster );
+	Type * newType = type->acceptMutator( adjuster );
 	type = newType;
 }
@@ -148,6 +148,6 @@
 } // anonymous namespace
 
-const ast::Type * adjustExprType( 
-	const ast::Type * type, const ast::TypeEnvironment & env, const ast::SymbolTable & symtab 
+const ast::Type * adjustExprType(
+	const ast::Type * type, const ast::TypeEnvironment & env, const ast::SymbolTable & symtab
 ) {
 	ast::Pass<AdjustExprType_new> adjuster{ env, symtab };
Index: src/ResolvExpr/CastCost.cc
===================================================================
--- src/ResolvExpr/CastCost.cc	(revision 7870799883ca946218c97fb6a189d1da90a16e8e)
+++ src/ResolvExpr/CastCost.cc	(revision ef5b8288bd2be4816de42f8ea6a9b3d5e5971b31)
@@ -37,5 +37,5 @@
 	struct CastCost_old : public ConversionCost {
 	  public:
-		CastCost_old( const Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc );
+		CastCost_old( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc );
 
 		using ConversionCost::previsit;
@@ -45,7 +45,7 @@
 	};
 
-	Cost castCost( const Type *src, const Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
-		if ( const TypeInstType *destAsTypeInst = dynamic_cast< const TypeInstType* >( dest ) ) {
-			if ( const EqvClass* eqvClass = env.lookup( destAsTypeInst->name ) ) {
+	Cost castCost( const Type * src, const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
+		if ( const TypeInstType * destAsTypeInst = dynamic_cast< const TypeInstType * >( dest ) ) {
+			if ( const EqvClass * eqvClass = env.lookup( destAsTypeInst->name ) ) {
 				if ( eqvClass->type ) {
 					return castCost( src, eqvClass->type, indexer, env );
@@ -53,7 +53,7 @@
 					return Cost::infinity;
 				}
-			} else if ( NamedTypeDecl *namedType = indexer.lookupType( destAsTypeInst->name ) ) {
+			} else if ( const NamedTypeDecl * namedType = indexer.lookupType( destAsTypeInst->name ) ) {
 				// all typedefs should be gone by this point
-				const TypeDecl * type = strict_dynamic_cast< const TypeDecl* >( namedType );
+				const TypeDecl * type = strict_dynamic_cast< const TypeDecl * >( namedType );
 				if ( type->base ) {
 					return castCost( src, type->base, indexer, env ) + Cost::safe;
@@ -74,5 +74,5 @@
 			PRINT( std::cerr << "compatible!" << std::endl; )
 			return Cost::zero;
-		} else if ( dynamic_cast< const VoidType* >( dest ) ) {
+		} else if ( dynamic_cast< const VoidType * >( dest ) ) {
 			return Cost::safe;
 		} else if ( const ReferenceType * refType = dynamic_cast< const ReferenceType * > ( dest ) ) {
@@ -96,12 +96,12 @@
 	}
 
-	CastCost_old::CastCost_old( const Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc )
+	CastCost_old::CastCost_old( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc )
 		: ConversionCost( dest, indexer, env, costFunc ) {
 	}
 
-	void CastCost_old::postvisit( const BasicType *basicType ) {
-		const PointerType *destAsPointer = dynamic_cast< const PointerType* >( dest );
+	void CastCost_old::postvisit( const BasicType * basicType ) {
+		const PointerType * destAsPointer = dynamic_cast< const PointerType * >( dest );
 		if ( destAsPointer && basicType->isInteger() ) {
-			// necessary for, e.g. unsigned long => void*
+			// necessary for, e.g. unsigned long => void *
 			cost = Cost::unsafe;
 		} else {
@@ -110,6 +110,6 @@
 	}
 
-	void CastCost_old::postvisit( const PointerType *pointerType ) {
-		if ( const PointerType *destAsPtr = dynamic_cast< const PointerType* >( dest ) ) {
+	void CastCost_old::postvisit( const PointerType * pointerType ) {
+		if ( const PointerType * destAsPtr = dynamic_cast< const PointerType * >( dest ) ) {
 			if ( pointerType->tq <= destAsPtr->tq && typesCompatibleIgnoreQualifiers( pointerType->base, destAsPtr->base, indexer, env ) ) {
 				cost = Cost::safe;
@@ -127,5 +127,5 @@
 		} else if ( const BasicType * destAsBasic = dynamic_cast< const BasicType * >( dest ) ) {
 			if ( destAsBasic->isInteger() ) {
-				// necessary for, e.g. void* => unsigned long
+				// necessary for, e.g. void * => unsigned long
 				cost = Cost::unsafe;
 			} // if
Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision 7870799883ca946218c97fb6a189d1da90a16e8e)
+++ src/ResolvExpr/CommonType.cc	(revision ef5b8288bd2be4816de42f8ea6a9b3d5e5971b31)
@@ -38,6 +38,6 @@
 namespace ResolvExpr {
 	struct CommonType_old : public WithShortCircuiting {
-		CommonType_old( Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars );
-		Type *get_result() const { return result; }
+		CommonType_old( Type * type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars );
+		Type * get_result() const { return result; }
 
 		void previsit( BaseSyntaxNode * ) { visit_children = false; }
@@ -60,9 +60,9 @@
 
 	  private:
-		template< typename Pointer > void getCommonWithVoidPointer( Pointer* voidPointer, Pointer* otherPointer );
-		template< typename RefType > void handleRefType( RefType *inst, Type *other );
-
-		Type *result;
-		Type *type2;				// inherited
+		template< typename Pointer > void getCommonWithVoidPointer( Pointer * voidPointer, Pointer * otherPointer );
+		template< typename RefType > void handleRefType( RefType * inst, Type * other );
+
+		Type * result;
+		Type * type2;				// inherited
 		bool widenFirst, widenSecond;
 		const SymTab::Indexer &indexer;
@@ -80,10 +80,10 @@
 				std::cerr << "unify success: " << widenFirst << " " << widenSecond << std::endl;
 			)
-			if ( (widenFirst || t2->get_qualifiers() <= t1->get_qualifiers()) && (widenSecond || t1->get_qualifiers() <= t2->get_qualifiers()) ) {
+			if ( (widenFirst || t2->tq <= t1->tq) && (widenSecond || t1->tq <= t2->tq) ) {
 				PRINT(
 					std::cerr << "widen okay" << std::endl;
 				)
-				common->get_qualifiers() |= t1->get_qualifiers();
-				common->get_qualifiers() |= t2->get_qualifiers();
+				common->tq |= t1->tq;
+				common->tq |= t2->tq;
 				return common;
 			}
@@ -95,5 +95,5 @@
 	}
 
-	Type *commonType( Type *type1, Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars ) {
+	Type * commonType( Type * type1, Type * type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars ) {
 		PassVisitor<CommonType_old> visitor( type2, widenFirst, widenSecond, indexer, env, openVars );
 
@@ -127,5 +127,5 @@
 						std::cerr << "formal is reference; result should be reference" << std::endl;
 					)
-					result = new ReferenceType( ref1->get_qualifiers(), result );
+					result = new ReferenceType( ref1->tq, result );
 				}
 				PRINT(
@@ -138,23 +138,23 @@
 
 		type1->accept( visitor );
-		Type *result = visitor.pass.get_result();
+		Type * result = visitor.pass.get_result();
 		if ( ! result ) {
 			// this appears to be handling for opaque type declarations
 			if ( widenSecond ) {
-				if ( TypeInstType *inst = dynamic_cast< TypeInstType* >( type2 ) ) {
-					if ( NamedTypeDecl *nt = indexer.lookupType( inst->get_name() ) ) {
-						TypeDecl *type = strict_dynamic_cast< TypeDecl* >( nt );
+				if ( const TypeInstType * inst = dynamic_cast< const TypeInstType * >( type2 ) ) {
+					if ( const NamedTypeDecl * nt = indexer.lookupType( inst->get_name() ) ) {
+						const TypeDecl * type = strict_dynamic_cast< const TypeDecl * >( nt );
 						if ( type->get_base() ) {
-							Type::Qualifiers tq1 = type1->get_qualifiers(), tq2 = type2->get_qualifiers();
+							Type::Qualifiers tq1 = type1->tq, tq2 = type2->tq;
 							AssertionSet have, need;
 							OpenVarSet newOpen( openVars );
-							type1->get_qualifiers() = Type::Qualifiers();
-							type->get_base()->get_qualifiers() = tq1;
+							type1->tq = Type::Qualifiers();
+							type->get_base()->tq = tq1;
 							if ( unifyExact( type1, type->get_base(), env, have, need, newOpen, indexer ) ) {
 								result = type1->clone();
-								result->get_qualifiers() = tq1 | tq2;
+								result->tq = tq1 | tq2;
 							} // if
-							type1->get_qualifiers() = tq1;
-							type->get_base()->get_qualifiers() = Type::Qualifiers();
+							type1->tq = tq1;
+							type->get_base()->tq = Type::Qualifiers();
 						} // if
 					} // if
@@ -190,5 +190,5 @@
 				 */
 				  {
-		/*     B*/                BT Bool,                BT Char,          BT SignedChar,        BT UnsignedChar,      BT ShortSignedInt,    BT ShortUnsignedInt,
+		/*     B */                BT Bool,                BT Char,          BT SignedChar,        BT UnsignedChar,      BT ShortSignedInt,    BT ShortUnsignedInt,
 				             BT SignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -198,5 +198,5 @@
 				  },
 				  {
-		/*     C*/                BT Char,                BT Char,          BT SignedChar,        BT UnsignedChar,      BT ShortSignedInt,    BT ShortUnsignedInt,
+		/*     C */                BT Char,                BT Char,          BT SignedChar,        BT UnsignedChar,      BT ShortSignedInt,    BT ShortUnsignedInt,
 				             BT SignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -206,5 +206,5 @@
 				  },
 				  {
-		/*    SC*/          BT SignedChar,          BT SignedChar,          BT SignedChar,        BT UnsignedChar,      BT ShortSignedInt,    BT ShortUnsignedInt,
+		/*    SC */          BT SignedChar,          BT SignedChar,          BT SignedChar,        BT UnsignedChar,      BT ShortSignedInt,    BT ShortUnsignedInt,
 				             BT SignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -214,5 +214,5 @@
 				  },
 				  {
-		/*    UC*/        BT UnsignedChar,        BT UnsignedChar,        BT UnsignedChar,        BT UnsignedChar,      BT ShortSignedInt,    BT ShortUnsignedInt,
+		/*    UC */        BT UnsignedChar,        BT UnsignedChar,        BT UnsignedChar,        BT UnsignedChar,      BT ShortSignedInt,    BT ShortUnsignedInt,
 				             BT SignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -222,5 +222,5 @@
 				  },
 				  {
-		/*    SI*/      BT ShortSignedInt,      BT ShortSignedInt,      BT ShortSignedInt,      BT ShortSignedInt,      BT ShortSignedInt,    BT ShortUnsignedInt,
+		/*    SI */      BT ShortSignedInt,      BT ShortSignedInt,      BT ShortSignedInt,      BT ShortSignedInt,      BT ShortSignedInt,    BT ShortUnsignedInt,
 				             BT SignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -230,5 +230,5 @@
 				  },
 				  {
-		/*   SUI*/    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,
+		/*   SUI */    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,
 				             BT SignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -238,5 +238,5 @@
 				  },
 				  {
-		/*     I*/           BT SignedInt,           BT SignedInt,           BT SignedInt,           BT SignedInt,           BT SignedInt,           BT SignedInt,
+		/*     I */           BT SignedInt,           BT SignedInt,           BT SignedInt,           BT SignedInt,           BT SignedInt,           BT SignedInt,
 				             BT SignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -246,5 +246,5 @@
 				  },
 				  {
-		/*    UI*/         BT UnsignedInt,         BT UnsignedInt,         BT UnsignedInt,         BT UnsignedInt,         BT UnsignedInt,         BT UnsignedInt,
+		/*    UI */         BT UnsignedInt,         BT UnsignedInt,         BT UnsignedInt,         BT UnsignedInt,         BT UnsignedInt,         BT UnsignedInt,
 				           BT UnsignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -254,5 +254,5 @@
 				  },
 				  {
-		/*    LI*/       BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,
+		/*    LI */       BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,
 				         BT LongSignedInt,       BT LongSignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -262,5 +262,5 @@
 				  },
 				  {
-		/*   LUI*/     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,
+		/*   LUI */     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,
 				       BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -270,5 +270,5 @@
 				  },
 				  {
-		/*   LLI*/   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,
+		/*   LLI */   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,
 				     BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -278,5 +278,5 @@
 				  },
 				  {
-		/*  LLUI*/ BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt,
+		/*  LLUI */ BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt,
 				   BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -286,5 +286,5 @@
 				  },
 				  {
-		/*    IB*/        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,
+		/*    IB */        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,
 				          BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,
 				          BT SignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -294,5 +294,5 @@
 				  },
 				  {
-		/*   UIB*/      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,
+		/*   UIB */      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,
 				        BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,
 				        BT UnsignedInt128,      BT UnsignedInt128,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -302,5 +302,5 @@
 				  },
 				  {
-		/*   _FH*/            BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,
+		/*   _FH */            BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,
 				              BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,            BT uFloat16,
 				              BT uFloat16,            BT uFloat16,            BT uFloat16,     BT uFloat16Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -310,5 +310,5 @@
 				  },
 				  {
-		/*   _FH*/     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,
+		/*   _FH */     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,
 				       BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,
 				       BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat16Complex,     BT uFloat32Complex,     BT uFloat32Complex,
@@ -318,5 +318,5 @@
 				  },
 				  {
-		/*    _F*/            BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,
+		/*    _F */            BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,
 				              BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,            BT uFloat32,
 				              BT uFloat32,            BT uFloat32,            BT uFloat32,     BT uFloat32Complex,            BT uFloat32,     BT uFloat32Complex,
@@ -326,5 +326,5 @@
 				  },
 				  {
-		/*   _FC*/     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,
+		/*   _FC */     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,
 				       BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,
 				       BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,     BT uFloat32Complex,
@@ -334,5 +334,5 @@
 				  },
 				  {
-		/*     F*/               BT Float,               BT Float,               BT Float,               BT Float,               BT Float,               BT Float,
+		/*     F */               BT Float,               BT Float,               BT Float,               BT Float,               BT Float,               BT Float,
 				                 BT Float,               BT Float,               BT Float,               BT Float,               BT Float,               BT Float,
 				                 BT Float,               BT Float,               BT Float,        BT FloatComplex,               BT Float,        BT FloatComplex,
@@ -342,5 +342,5 @@
 				  },
 				  {
-		/*    FC*/        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,
+		/*    FC */        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,
 				          BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,
 				          BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,        BT FloatComplex,
@@ -350,5 +350,5 @@
 				  },
 				  {
-		/*   _FX*/           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,
+		/*   _FX */           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,
 				             BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,           BT uFloat32x,
 				             BT uFloat32x,           BT uFloat32x,           BT uFloat32x,    BT uFloat32xComplex,           BT uFloat32x,    BT uFloat32xComplex,
@@ -358,5 +358,5 @@
 				  },
 				  {
-		/*  _FXC*/    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,
+		/*  _FXC */    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,
 				      BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,
 				      BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,    BT uFloat32xComplex,
@@ -366,5 +366,5 @@
 				  },
 				  {
-		/*    FD*/            BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,
+		/*    FD */            BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,
 				              BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,            BT uFloat64,
 				              BT uFloat64,            BT uFloat64,            BT uFloat64,     BT uFloat64Complex,            BT uFloat64,     BT uFloat64Complex,
@@ -374,5 +374,5 @@
 				  },
 				  {
-		/*  _FDC*/     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,
+		/*  _FDC */     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,
 				       BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,
 				       BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,     BT uFloat64Complex,
@@ -382,5 +382,5 @@
 				  },
 				  {
-		/*     D*/              BT Double,              BT Double,              BT Double,              BT Double,              BT Double,              BT Double,
+		/*     D */              BT Double,              BT Double,              BT Double,              BT Double,              BT Double,              BT Double,
 				                BT Double,              BT Double,              BT Double,              BT Double,              BT Double,              BT Double,
 				                BT Double,              BT Double,              BT Double,       BT DoubleComplex,              BT Double,       BT DoubleComplex,
@@ -390,5 +390,5 @@
 				  },
 				  {
-		/*    DC*/       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,
+		/*    DC */       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,
 				         BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,
 				         BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,       BT DoubleComplex,
@@ -398,5 +398,5 @@
 				  },
 				  {
-		/*  F80X*/           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,
+		/*  F80X */           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,
 				             BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,           BT uFloat64x,
 				             BT uFloat64x,           BT uFloat64x,           BT uFloat64x,    BT uFloat64xComplex,           BT uFloat64x,    BT uFloat64xComplex,
@@ -406,5 +406,5 @@
 				  },
 				  {
-		/* _FDXC*/    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,
+		/* _FDXC */    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,
 				      BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,
 				      BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,    BT uFloat64xComplex,
@@ -422,5 +422,5 @@
 				  },
 				  {
-		/*   _FB*/           BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,
+		/*   _FB */           BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,
 				             BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,           BT uFloat128,
 				             BT uFloat128,           BT uFloat128,           BT uFloat128,    BT uFloat128Complex,           BT uFloat128,    BT uFloat128Complex,
@@ -430,5 +430,5 @@
 				  },
 				  {
-		/* _FLDC*/    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,
+		/* _FLDC */    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,
 				      BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,
 				      BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,    BT uFloat128Complex,
@@ -438,5 +438,5 @@
 				  },
 				  {
-		/*    FB*/          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,
+		/*    FB */          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,
 				            BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,
 				            BT uuFloat128,          BT uuFloat128,          BT uuFloat128,    BT uFloat128Complex,          BT uuFloat128,    BT uFloat128Complex,
@@ -446,5 +446,5 @@
 				  },
 				  {
-		/*    LD*/          BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,
+		/*    LD */          BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,
 				            BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,          BT LongDouble,
 				            BT LongDouble,          BT LongDouble,          BT LongDouble,   BT LongDoubleComplex,          BT LongDouble,   BT LongDoubleComplex,
@@ -454,5 +454,5 @@
 				  },
 				  {
-		/*   LDC*/   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,
+		/*   LDC */   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,
 				     BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,
 				     BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,   BT LongDoubleComplex,
@@ -462,5 +462,5 @@
 				  },
 				  {
-		/*  _FBX*/          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,
+		/*  _FBX */          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,
 				            BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,          BT uFloat128x,
 				            BT uFloat128x,          BT uFloat128x,          BT uFloat128x,   BT uFloat128xComplex,          BT uFloat128x,   BT uFloat128xComplex,
@@ -470,5 +470,5 @@
 				  },
 				  {
-		/*_FLDXC*/   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,
+		/* _FLDXC */   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,
 				     BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,
 				     BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,   BT uFloat128xComplex,
@@ -481,9 +481,9 @@
 	// GENERATED END
 	static_assert(
-		sizeof(commonTypes)/sizeof(commonTypes[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES*BasicType::NUMBER_OF_BASIC_TYPES,
+		sizeof(commonTypes)/sizeof(commonTypes[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES * BasicType::NUMBER_OF_BASIC_TYPES,
 		"Each basic type kind should have a corresponding row in the combined type matrix"
 	);
 
-	CommonType_old::CommonType_old( Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars )
+	CommonType_old::CommonType_old( Type * type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars )
 		: result( 0 ), type2( type2 ), widenFirst( widenFirst ), widenSecond( widenSecond ), indexer( indexer ), env( env ), openVars( openVars ) {
 	}
@@ -491,15 +491,15 @@
 	void CommonType_old::postvisit( VoidType * ) {}
 
-	void CommonType_old::postvisit( BasicType *basicType ) {
-		if ( BasicType *otherBasic = dynamic_cast< BasicType* >( type2 ) ) {
+	void CommonType_old::postvisit( BasicType * basicType ) {
+		if ( BasicType * otherBasic = dynamic_cast< BasicType * >( type2 ) ) {
 			BasicType::Kind newType = commonTypes[ basicType->get_kind() ][ otherBasic->get_kind() ];
-			if ( ( ( newType == basicType->get_kind() && basicType->get_qualifiers() >= otherBasic->get_qualifiers() ) || widenFirst ) && ( ( newType == otherBasic->get_kind() && basicType->get_qualifiers() <= otherBasic->get_qualifiers() ) || widenSecond ) ) {
-				result = new BasicType( basicType->get_qualifiers() | otherBasic->get_qualifiers(), newType );
+			if ( ( ( newType == basicType->get_kind() && basicType->tq >= otherBasic->tq ) || widenFirst ) && ( ( newType == otherBasic->get_kind() && basicType->tq <= otherBasic->tq ) || widenSecond ) ) {
+				result = new BasicType( basicType->tq | otherBasic->tq, newType );
 			} // if
-		} else if ( dynamic_cast< EnumInstType * > ( type2 ) || dynamic_cast< ZeroType* >( type2 ) || dynamic_cast< OneType* >( type2 ) ) {
+		} else if ( dynamic_cast< EnumInstType * > ( type2 ) || dynamic_cast< ZeroType * >( type2 ) || dynamic_cast< OneType * >( type2 ) ) {
 			// use signed int in lieu of the enum/zero/one type
 			BasicType::Kind newType = commonTypes[ basicType->get_kind() ][ BasicType::SignedInt ];
-			if ( ( ( newType == basicType->get_kind() && basicType->get_qualifiers() >= type2->get_qualifiers() ) || widenFirst ) && ( ( newType != basicType->get_kind() && basicType->get_qualifiers() <= type2->get_qualifiers() ) || widenSecond ) ) {
-				result = new BasicType( basicType->get_qualifiers() | type2->get_qualifiers(), newType );
+			if ( ( ( newType == basicType->get_kind() && basicType->tq >= type2->tq ) || widenFirst ) && ( ( newType != basicType->get_kind() && basicType->tq <= type2->tq ) || widenSecond ) ) {
+				result = new BasicType( basicType->tq | type2->tq, newType );
 			} // if
 		} // if
@@ -507,6 +507,6 @@
 
 	template< typename Pointer >
-	void CommonType_old::getCommonWithVoidPointer( Pointer* voidPointer, Pointer* otherPointer ) {
-		if ( TypeInstType* var = dynamic_cast< TypeInstType* >( otherPointer->get_base() ) ) {
+	void CommonType_old::getCommonWithVoidPointer( Pointer * voidPointer, Pointer * otherPointer ) {
+		if ( TypeInstType * var = dynamic_cast< TypeInstType * >( otherPointer->get_base() ) ) {
 			OpenVarSet::const_iterator entry = openVars.find( var->get_name() );
 			if ( entry != openVars.end() ) {
@@ -517,20 +517,20 @@
 		}
 		result = voidPointer->clone();
-		result->get_qualifiers() |= otherPointer->get_qualifiers();
-	}
-
-	void CommonType_old::postvisit( PointerType *pointerType ) {
-		if ( PointerType *otherPointer = dynamic_cast< PointerType* >( type2 ) ) {
+		result->tq |= otherPointer->tq;
+	}
+
+	void CommonType_old::postvisit( PointerType * pointerType ) {
+		if ( PointerType * otherPointer = dynamic_cast< PointerType * >( type2 ) ) {
 			// std::cerr << "commonType: two pointers: " << pointerType << " / " << otherPointer << std::endl;
-			if ( widenFirst && dynamic_cast< VoidType* >( otherPointer->get_base() ) && ! isFtype(pointerType->get_base()) ) {
+			if ( widenFirst && dynamic_cast< VoidType * >( otherPointer->get_base() ) && ! isFtype(pointerType->get_base()) ) {
 				getCommonWithVoidPointer( otherPointer, pointerType );
-			} else if ( widenSecond && dynamic_cast< VoidType* >( pointerType->get_base() ) && ! isFtype(otherPointer->get_base()) ) {
+			} else if ( widenSecond && dynamic_cast< VoidType * >( pointerType->get_base() ) && ! isFtype(otherPointer->get_base()) ) {
 				getCommonWithVoidPointer( pointerType, otherPointer );
-			} else if ( ( pointerType->get_base()->get_qualifiers() >= otherPointer->get_base()->get_qualifiers() || widenFirst )
-					   && ( pointerType->get_base()->get_qualifiers() <= otherPointer->get_base()->get_qualifiers() || widenSecond ) ) {
+			} else if ( ( pointerType->get_base()->tq >= otherPointer->get_base()->tq || widenFirst )
+					   && ( pointerType->get_base()->tq <= otherPointer->get_base()->tq || widenSecond ) ) {
 				// std::cerr << "middle case" << std::endl;
-				Type::Qualifiers tq1 = pointerType->get_base()->get_qualifiers(), tq2 = otherPointer->get_base()->get_qualifiers();
-				pointerType->get_base()->get_qualifiers() = Type::Qualifiers();
-				otherPointer->get_base()->get_qualifiers() = Type::Qualifiers();
+				Type::Qualifiers tq1 = pointerType->get_base()->tq, tq2 = otherPointer->get_base()->tq;
+				pointerType->get_base()->tq = Type::Qualifiers();
+				otherPointer->get_base()->tq = Type::Qualifiers();
 				AssertionSet have, need;
 				OpenVarSet newOpen( openVars );
@@ -542,14 +542,14 @@
 						result = otherPointer->clone();
 					} // if
-					strict_dynamic_cast<PointerType*>(result)->base->get_qualifiers() = tq1 | tq2;
+					strict_dynamic_cast<PointerType *>(result)->base->tq = tq1 | tq2;
 				} else {
 					/// std::cerr << "place for ptr-to-type" << std::endl;
 				} // if
-				pointerType->get_base()->get_qualifiers() = tq1;
-				otherPointer->get_base()->get_qualifiers() = tq2;
+				pointerType->get_base()->tq = tq1;
+				otherPointer->get_base()->tq = tq2;
 			} // if
-		} else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
+		} else if ( widenSecond && dynamic_cast< ZeroType * >( type2 ) ) {
 			result = pointerType->clone();
-			result->get_qualifiers() |= type2->get_qualifiers();
+			result->tq |= type2->tq;
 		} // if
 	}
@@ -557,18 +557,18 @@
 	void CommonType_old::postvisit( ArrayType * ) {}
 
-	void CommonType_old::postvisit( ReferenceType *refType ) {
-		if ( ReferenceType *otherRef = dynamic_cast< ReferenceType* >( type2 ) ) {
+	void CommonType_old::postvisit( ReferenceType * refType ) {
+		if ( ReferenceType * otherRef = dynamic_cast< ReferenceType * >( type2 ) ) {
 			// std::cerr << "commonType: both references: " << refType << " / " << otherRef << std::endl;
-			// std::cerr << ( refType->get_base()->get_qualifiers() >= otherRef->get_base()->get_qualifiers() || widenFirst ) << (refType->get_base()->get_qualifiers() <= otherRef->get_base()->get_qualifiers() || widenSecond) << std::endl;
-			if ( widenFirst && dynamic_cast< VoidType* >( otherRef->get_base() ) && ! isFtype(refType->get_base()) ) {
+			// std::cerr << ( refType->get_base()->tq >= otherRef->get_base()->tq || widenFirst ) << (refType->get_base()->tq <= otherRef->get_base()->tq || widenSecond) << std::endl;
+			if ( widenFirst && dynamic_cast< VoidType * >( otherRef->get_base() ) && ! isFtype(refType->get_base()) ) {
 				getCommonWithVoidPointer( otherRef, refType );
-			} else if ( widenSecond && dynamic_cast< VoidType* >( refType->get_base() ) && ! isFtype(otherRef->get_base()) ) {
+			} else if ( widenSecond && dynamic_cast< VoidType * >( refType->get_base() ) && ! isFtype(otherRef->get_base()) ) {
 				getCommonWithVoidPointer( refType, otherRef );
-			} else if ( ( refType->get_base()->get_qualifiers() >= otherRef->get_base()->get_qualifiers() || widenFirst )
-					   && ( refType->get_base()->get_qualifiers() <= otherRef->get_base()->get_qualifiers() || widenSecond ) ) {
+			} else if ( ( refType->get_base()->tq >= otherRef->get_base()->tq || widenFirst )
+					   && ( refType->get_base()->tq <= otherRef->get_base()->tq || widenSecond ) ) {
 				// std::cerr << "middle case" << std::endl;
-				Type::Qualifiers tq1 = refType->get_base()->get_qualifiers(), tq2 = otherRef->get_base()->get_qualifiers();
-				refType->get_base()->get_qualifiers() = Type::Qualifiers();
-				otherRef->get_base()->get_qualifiers() = Type::Qualifiers();
+				Type::Qualifiers tq1 = refType->get_base()->tq, tq2 = otherRef->get_base()->tq;
+				refType->get_base()->tq = Type::Qualifiers();
+				otherRef->get_base()->tq = Type::Qualifiers();
 				AssertionSet have, need;
 				OpenVarSet newOpen( openVars );
@@ -579,14 +579,14 @@
 						result = otherRef->clone();
 					} // if
-					strict_dynamic_cast<ReferenceType*>(result)->base->get_qualifiers() = tq1 | tq2;
+					strict_dynamic_cast<ReferenceType *>(result)->base->tq = tq1 | tq2;
 				} else {
 					/// std::cerr << "place for ptr-to-type" << std::endl;
 				} // if
-				refType->get_base()->get_qualifiers() = tq1;
-				otherRef->get_base()->get_qualifiers() = tq2;
+				refType->get_base()->tq = tq1;
+				otherRef->get_base()->tq = tq2;
 			} // if
-		} else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
+		} else if ( widenSecond && dynamic_cast< ZeroType * >( type2 ) ) {
 			result = refType->clone();
-			result->get_qualifiers() |= type2->get_qualifiers();
+			result->tq |= type2->tq;
 		} // if
 	}
@@ -596,6 +596,6 @@
 	void CommonType_old::postvisit( UnionInstType * ) {}
 
-	void CommonType_old::postvisit( EnumInstType *enumInstType ) {
-		if ( dynamic_cast< BasicType * >( type2 ) || dynamic_cast< ZeroType* >( type2 ) || dynamic_cast< OneType* >( type2 ) ) {
+	void CommonType_old::postvisit( EnumInstType * enumInstType ) {
+		if ( dynamic_cast< BasicType * >( type2 ) || dynamic_cast< ZeroType * >( type2 ) || dynamic_cast< OneType * >( type2 ) ) {
 			// reuse BasicType, EnumInstType code by swapping type2 with enumInstType
 			result = commonType( type2, enumInstType, widenSecond, widenFirst, indexer, env, openVars );
@@ -606,21 +606,21 @@
 	}
 
-	void CommonType_old::postvisit( TypeInstType *inst ) {
+	void CommonType_old::postvisit( TypeInstType * inst ) {
 		if ( widenFirst ) {
-			NamedTypeDecl *nt = indexer.lookupType( inst->get_name() );
+			const NamedTypeDecl * nt = indexer.lookupType( inst->get_name() );
 			if ( nt ) {
-				TypeDecl *type = strict_dynamic_cast< TypeDecl* >( nt );
+				const TypeDecl * type = strict_dynamic_cast< const TypeDecl * >( nt );
 				if ( type->get_base() ) {
-					Type::Qualifiers tq1 = inst->get_qualifiers(), tq2 = type2->get_qualifiers();
+					Type::Qualifiers tq1 = inst->tq, tq2 = type2->tq;
 					AssertionSet have, need;
 					OpenVarSet newOpen( openVars );
-					type2->get_qualifiers() = Type::Qualifiers();
-					type->get_base()->get_qualifiers() = tq1;
+					type2->tq = Type::Qualifiers();
+					type->get_base()->tq = tq1;
 					if ( unifyExact( type->get_base(), type2, env, have, need, newOpen, indexer ) ) {
 						result = type2->clone();
-						result->get_qualifiers() = tq1 | tq2;
+						result->tq = tq1 | tq2;
 					} // if
-					type2->get_qualifiers() = tq2;
-					type->get_base()->get_qualifiers() = Type::Qualifiers();
+					type2->tq = tq2;
+					type->get_base()->tq = Type::Qualifiers();
 				} // if
 			} // if
@@ -631,28 +631,28 @@
 	void CommonType_old::postvisit( VarArgsType * ) {}
 
-	void CommonType_old::postvisit( ZeroType *zeroType ) {
+	void CommonType_old::postvisit( ZeroType * zeroType ) {
 		if ( widenFirst ) {
-			if ( dynamic_cast< BasicType* >( type2 ) || dynamic_cast< PointerType* >( type2 ) || dynamic_cast< EnumInstType* >( type2 ) ) {
-				if ( widenSecond || zeroType->get_qualifiers() <= type2->get_qualifiers() ) {
+			if ( dynamic_cast< BasicType * >( type2 ) || dynamic_cast< PointerType * >( type2 ) || dynamic_cast< EnumInstType * >( type2 ) ) {
+				if ( widenSecond || zeroType->tq <= type2->tq ) {
 					result = type2->clone();
-					result->get_qualifiers() |= zeroType->get_qualifiers();
-				}
-			} else if ( widenSecond && dynamic_cast< OneType* >( type2 ) ) {
-				result = new BasicType( zeroType->get_qualifiers(), BasicType::SignedInt );
-				result->get_qualifiers() |= type2->get_qualifiers();
-			}
-		}
-	}
-
-	void CommonType_old::postvisit( OneType *oneType ) {
+					result->tq |= zeroType->tq;
+				}
+			} else if ( widenSecond && dynamic_cast< OneType * >( type2 ) ) {
+				result = new BasicType( zeroType->tq, BasicType::SignedInt );
+				result->tq |= type2->tq;
+			}
+		}
+	}
+
+	void CommonType_old::postvisit( OneType * oneType ) {
 		if ( widenFirst ) {
-			if ( dynamic_cast< BasicType* >( type2 ) || dynamic_cast< EnumInstType* >( type2 ) ) {
-				if ( widenSecond || oneType->get_qualifiers() <= type2->get_qualifiers() ) {
+			if ( dynamic_cast< BasicType * >( type2 ) || dynamic_cast< EnumInstType * >( type2 ) ) {
+				if ( widenSecond || oneType->tq <= type2->tq ) {
 					result = type2->clone();
-					result->get_qualifiers() |= oneType->get_qualifiers();
-				}
-			} else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
-				result = new BasicType( oneType->get_qualifiers(), BasicType::SignedInt );
-				result->get_qualifiers() |= type2->get_qualifiers();
+					result->tq |= oneType->tq;
+				}
+			} else if ( widenSecond && dynamic_cast< ZeroType * >( type2 ) ) {
+				result = new BasicType( oneType->tq, BasicType::SignedInt );
+				result->tq |= type2->tq;
 			}
 		}
@@ -668,6 +668,6 @@
 		ast::ptr< ast::Type > result;
 
-		CommonType_new( 
-			const ast::Type * t2, WidenMode w, const ast::SymbolTable & st, 
+		CommonType_new(
+			const ast::Type * t2, WidenMode w, const ast::SymbolTable & st,
 			ast::TypeEnvironment & env, const ast::OpenVarSet & o )
 		: type2( t2 ), widen( w ), symtab( st ), tenv( env ), open( o ), result() {}
@@ -681,14 +681,14 @@
 				#warning remove casts when `commonTypes` moved to new AST
 				ast::BasicType::Kind kind = (ast::BasicType::Kind)(int)commonTypes[ (BasicType::Kind)(int)basic->kind ][ (BasicType::Kind)(int)basic2->kind ];
-				if ( 
-					( ( kind == basic->kind && basic->qualifiers >= basic2->qualifiers ) 
-						|| widen.first ) 
-					&& ( ( kind == basic2->kind && basic->qualifiers <= basic2->qualifiers ) 
-						|| widen.second ) 
+				if (
+					( ( kind == basic->kind && basic->qualifiers >= basic2->qualifiers )
+						|| widen.first )
+					&& ( ( kind == basic2->kind && basic->qualifiers <= basic2->qualifiers )
+						|| widen.second )
 				) {
 					result = new ast::BasicType{ kind, basic->qualifiers | basic2->qualifiers };
 				}
-			} else if ( 
-				dynamic_cast< const ast::EnumInstType * >( type2 ) 
+			} else if (
+				dynamic_cast< const ast::EnumInstType * >( type2 )
 				|| dynamic_cast< const ast::ZeroType * >( type2 )
 				|| dynamic_cast< const ast::OneType * >( type2 )
@@ -696,9 +696,9 @@
 				#warning remove casts when `commonTypes` moved to new AST
 				ast::BasicType::Kind kind = (ast::BasicType::Kind)(int)commonTypes[ (BasicType::Kind)(int)basic->kind ][ (BasicType::Kind)(int)ast::BasicType::SignedInt ];
-				if ( 
-					( ( kind == basic->kind && basic->qualifiers >= type2->qualifiers ) 
-						|| widen.first ) 
-					&& ( ( kind != basic->kind && basic->qualifiers <= type2->qualifiers ) 
-						|| widen.second ) 
+				if (
+					( ( kind == basic->kind && basic->qualifiers >= type2->qualifiers )
+						|| widen.first )
+					&& ( ( kind != basic->kind && basic->qualifiers <= type2->qualifiers )
+						|| widen.second )
 				) {
 					result = new ast::BasicType{ kind, basic->qualifiers | type2->qualifiers };
@@ -715,6 +715,6 @@
 				if ( entry != open.end() ) {
 					ast::AssertionSet need, have;
-					if ( ! tenv.bindVar( 
-						var, voidPtr->base, entry->second, need, have, open, widen, symtab ) 
+					if ( ! tenv.bindVar(
+						var, voidPtr->base, entry->second, need, have, open, widen, symtab )
 					) return;
 				}
@@ -727,14 +727,14 @@
 		void postvisit( const ast::PointerType * pointer ) {
 			if ( auto pointer2 = dynamic_cast< const ast::PointerType * >( type2 ) ) {
-				if ( 
-					widen.first 
-					&& pointer2->base.as< ast::VoidType >() 
-					&& ! ast::isFtype( pointer->base ) 
+				if (
+					widen.first
+					&& pointer2->base.as< ast::VoidType >()
+					&& ! ast::isFtype( pointer->base )
 				) {
 					getCommonWithVoidPointer( pointer2, pointer );
-				} else if ( 
-					widen.second 
-					&& pointer->base.as< ast::VoidType >() 
-					&& ! ast::isFtype( pointer2->base ) 
+				} else if (
+					widen.second
+					&& pointer->base.as< ast::VoidType >()
+					&& ! ast::isFtype( pointer2->base )
 				) {
 					getCommonWithVoidPointer( pointer, pointer2 );
@@ -746,10 +746,10 @@
 					ast::CV::Qualifiers q2 = pointer2->base->qualifiers;
 
-					// force t{1,2} to be cloned if their qualifiers must be stripped, so that 
+					// force t{1,2} to be cloned if their qualifiers must be stripped, so that
 					// pointer{,2}->base are unchanged
 					ast::ptr< ast::Type > t1{ pointer->base }, t2{ pointer2->base };
 					reset_qualifiers( t1 );
 					reset_qualifiers( t2 );
-					
+
 					ast::AssertionSet have, need;
 					ast::OpenVarSet newOpen{ open };
@@ -758,6 +758,6 @@
 						if ( q1.val != q2.val ) {
 							// reset result->base->qualifiers to be union of two base qualifiers
-							strict_dynamic_cast< ast::PointerType * >( 
-								result.get_and_mutate() 
+							strict_dynamic_cast< ast::PointerType * >(
+								result.get_and_mutate()
 							)->base.get_and_mutate()->qualifiers = q1 | q2;
 						}
@@ -775,9 +775,9 @@
 			if ( auto ref2 = dynamic_cast< const ast::ReferenceType * >( type2 ) ) {
 				if (
-					widen.first && ref2->base.as< ast::VoidType >() && ! ast::isFtype( ref->base ) 
+					widen.first && ref2->base.as< ast::VoidType >() && ! ast::isFtype( ref->base )
 				) {
 					getCommonWithVoidPointer( ref2, ref );
-				} else if ( 
-					widen.second && ref->base.as< ast::VoidType>() && ! ast::isFtype( ref2->base ) 
+				} else if (
+					widen.second && ref->base.as< ast::VoidType>() && ! ast::isFtype( ref2->base )
 				) {
 					getCommonWithVoidPointer( ref, ref2 );
@@ -788,5 +788,5 @@
 					ast::CV::Qualifiers q1 = ref->base->qualifiers, q2 = ref2->base->qualifiers;
 
-					// force t{1,2} to be cloned if their qualifiers must be stripped, so that 
+					// force t{1,2} to be cloned if their qualifiers must be stripped, so that
 					// ref{,2}->base are unchanged
 					ast::ptr< ast::Type > t1{ ref->base }, t2{ ref2->base };
@@ -800,6 +800,6 @@
 						if ( q1.val != q2.val ) {
 							// reset result->base->qualifiers to be union of two base qualifiers
-							strict_dynamic_cast< ast::ReferenceType * >( 
-								result.get_and_mutate() 
+							strict_dynamic_cast< ast::ReferenceType * >(
+								result.get_and_mutate()
 							)->base.get_and_mutate()->qualifiers = q1 | q2;
 						}
@@ -819,6 +819,6 @@
 
 		void postvisit( const ast::EnumInstType * enumInst ) {
-			if ( 
-				dynamic_cast< const ast::BasicType * >( type2 ) 
+			if (
+				dynamic_cast< const ast::BasicType * >( type2 )
 				|| dynamic_cast< const ast::ZeroType * >( type2 )
 				|| dynamic_cast< const ast::OneType * >( type2 )
@@ -834,6 +834,6 @@
 			if ( ! widen.first ) return;
 			if ( const ast::NamedTypeDecl * nt = symtab.lookupType( inst->name ) ) {
-				if ( const ast::Type * base = 
-						strict_dynamic_cast< const ast::TypeDecl * >( nt )->base 
+				if ( const ast::Type * base =
+						strict_dynamic_cast< const ast::TypeDecl * >( nt )->base
 				) {
 					ast::CV::Qualifiers q1 = inst->qualifiers, q2 = type2->qualifiers;
@@ -860,5 +860,5 @@
 		void postvisit( const ast::ZeroType * zero ) {
 			if ( ! widen.first ) return;
-			if ( 
+			if (
 				dynamic_cast< const ast::BasicType * >( type2 )
 				|| dynamic_cast< const ast::PointerType * >( type2 )
@@ -870,5 +870,5 @@
 				}
 			} else if ( widen.second && dynamic_cast< const ast::OneType * >( type2 ) ) {
-				result = new ast::BasicType{ 
+				result = new ast::BasicType{
 					ast::BasicType::SignedInt, zero->qualifiers | type2->qualifiers };
 			}
@@ -877,5 +877,5 @@
 		void postvisit( const ast::OneType * one ) {
 			if ( ! widen.first ) return;
-			if ( 
+			if (
 				dynamic_cast< const ast::BasicType * >( type2 )
 				|| dynamic_cast< const ast::EnumInstType * >( type2 )
@@ -886,5 +886,5 @@
 				}
 			} else if ( widen.second && dynamic_cast< const ast::ZeroType * >( type2 ) ) {
-				result = new ast::BasicType{ 
+				result = new ast::BasicType{
 					ast::BasicType::SignedInt, one->qualifiers | type2->qualifiers };
 			}
@@ -894,8 +894,8 @@
 
 	namespace {
-		ast::ptr< ast::Type > handleReference( 
-			const ast::ptr< ast::Type > & t1, const ast::ptr< ast::Type > & t2, WidenMode widen, 
-			const ast::SymbolTable & symtab, ast::TypeEnvironment & env, 
-			const ast::OpenVarSet & open 
+		ast::ptr< ast::Type > handleReference(
+			const ast::ptr< ast::Type > & t1, const ast::ptr< ast::Type > & t2, WidenMode widen,
+			const ast::SymbolTable & symtab, ast::TypeEnvironment & env,
+			const ast::OpenVarSet & open
 		) {
 			ast::ptr<ast::Type> common;
@@ -926,7 +926,7 @@
 
 	ast::ptr< ast::Type > commonType(
-			const ast::ptr< ast::Type > & type1, const ast::ptr< ast::Type > & type2, 
-			WidenMode widen, const ast::SymbolTable & symtab, ast::TypeEnvironment & env, 
-			const ast::OpenVarSet & open 
+			const ast::ptr< ast::Type > & type1, const ast::ptr< ast::Type > & type2,
+			WidenMode widen, const ast::SymbolTable & symtab, ast::TypeEnvironment & env,
+			const ast::OpenVarSet & open
 	) {
 		unsigned depth1 = type1->referenceDepth();
@@ -940,5 +940,5 @@
 			const ast::ReferenceType * ref1 = type1.as< ast::ReferenceType >();
 			const ast::ReferenceType * ref2 = type1.as< ast::ReferenceType >();
-			
+
 			if ( depth1 > depth2 ) {
 				assert( ref1 );
@@ -978,11 +978,11 @@
 						ast::OpenVarSet newOpen{ open };
 
-						// force t{1,2} to be cloned if its qualifiers must be stripped, so that 
-						// type1 and type->base are left unchanged; calling convention forces 
+						// force t{1,2} to be cloned if its qualifiers must be stripped, so that
+						// type1 and type->base are left unchanged; calling convention forces
 						// {type1,type->base}->strong_ref >= 1
 						ast::ptr<ast::Type> t1{ type1 }, t2{ type->base };
 						reset_qualifiers( t1 );
 						reset_qualifiers( t2, q1 );
-						
+
 						if ( unifyExact( t1, t2, env, have, need, newOpen, noWiden(), symtab ) ) {
 							result = t1;
Index: src/ResolvExpr/ConversionCost.cc
===================================================================
--- src/ResolvExpr/ConversionCost.cc	(revision 7870799883ca946218c97fb6a189d1da90a16e8e)
+++ src/ResolvExpr/ConversionCost.cc	(revision ef5b8288bd2be4816de42f8ea6a9b3d5e5971b31)
@@ -49,5 +49,5 @@
 		if ( const TypeInstType * destAsTypeInst = dynamic_cast< const TypeInstType * >( dest ) ) {
 			PRINT( std::cerr << "type inst " << destAsTypeInst->name; )
-			if ( const EqvClass* eqvClass = env.lookup( destAsTypeInst->name ) ) {
+			if ( const EqvClass * eqvClass = env.lookup( destAsTypeInst->name ) ) {
 				if ( eqvClass->type ) {
 					return conversionCost( src, eqvClass->type, indexer, env );
@@ -57,5 +57,5 @@
 			} else if ( const NamedTypeDecl * namedType = indexer.lookupType( destAsTypeInst->name ) ) {
 				PRINT( std::cerr << " found" << std::endl; )
-				const TypeDecl *type = dynamic_cast< const TypeDecl* >( namedType );
+				const TypeDecl * type = dynamic_cast< const TypeDecl * >( namedType );
 				// all typedefs should be gone by this point
 				assert( type );
@@ -87,5 +87,5 @@
 			PassVisitor<ConversionCost> converter(
 				dest, indexer, env,
-				(Cost (*)(const Type*, const Type*, const SymTab::Indexer&, const TypeEnvironment&))
+				(Cost (*)(const Type *, const Type *, const SymTab::Indexer&, const TypeEnvironment&))
 					conversionCost );
 			src->accept( converter );
@@ -139,5 +139,5 @@
 				PassVisitor<ConversionCost> converter(
 					dest, indexer, env,
-					(Cost (*)(const Type*, const Type*, const SymTab::Indexer&, const TypeEnvironment&))
+					(Cost (*)(const Type *, const Type *, const SymTab::Indexer&, const TypeEnvironment&))
 						conversionCost );
 				src->accept( converter );
@@ -185,5 +185,5 @@
 	}
 
-	ConversionCost::ConversionCost( const Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc )
+	ConversionCost::ConversionCost( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc )
 		: dest( dest ), indexer( indexer ), cost( Cost::infinity ), env( env ), costFunc( costFunc ) {
 	}
@@ -218,45 +218,45 @@
 	static const int costMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node
 		/*             B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
-		/*     B*/ {   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  15,  16,  17,  16,  18,  17, },
-		/*     C*/ {  -1,   0,   1,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
-		/*    SC*/ {  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
-		/*    UC*/ {  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
-		/*    SI*/ {  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  14,  16,  15, },
-		/*   SUI*/ {  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  14,  16,  15, },
-		/*     I*/ {  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  14,  13,  15,  14, },
-		/*    UI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  14,  13,  15,  14, },
-		/*    LI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  13,  12,  14,  13, },
-		/*   LUI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  13,  12,  14,  13, },
-		/*   LLI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  11,  13,  12, },
-		/*  LLUI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  11,  13,  12, },
-		/*    IB*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  11,  10,  12,  11, },
-		/*   UIB*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  11,  10,  12,  11, },
-		/*   _FH*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,  10,   9,  11,  10, },
-		/*   _FH*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,   5,  -1,   6,  -1,  -1,   7,  -1,  -1,   8,  -1,   9, },
-		/*    _F*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   9,   8,  10,   9, },
-		/*   _FC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,   5,  -1,  -1,   6,  -1,  -1,   7,  -1,   8, },
-		/*     F*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   8,   7,   9,   8, },
-		/*    FC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,  -1,   5,  -1,  -1,   6,  -1,   7, },
-		/*   _FX*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   7,   6,   8,   7, },
-		/*  _FXC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,  -1,   4,  -1,  -1,   5,  -1,   6, },
-		/*    FD*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   6,   5,   7,   6, },
-		/*  _FDC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,  -1,   3,  -1,  -1,   4,  -1,   5, },
-		/*     D*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   5,   4,   6,   5, },
-		/*    DC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,  -1,   2,  -1,  -1,   3,  -1,   4, },
-		/*  F80X*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   4,   3,   5,   4, },
-		/* _FDXC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   1,  -1,  -1,   2,  -1,   3, },
+		/*     B */ {   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  15,  16,  17,  16,  18,  17, },
+		/*     C */ {  -1,   0,   1,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
+		/*    SC */ {  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
+		/*    UC */ {  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
+		/*    SI */ {  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  14,  16,  15, },
+		/*   SUI */ {  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  14,  16,  15, },
+		/*     I */ {  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  14,  13,  15,  14, },
+		/*    UI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  14,  13,  15,  14, },
+		/*    LI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  13,  12,  14,  13, },
+		/*   LUI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  13,  12,  14,  13, },
+		/*   LLI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  11,  13,  12, },
+		/*  LLUI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  11,  13,  12, },
+		/*    IB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  11,  10,  12,  11, },
+		/*   UIB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  11,  10,  12,  11, },
+		/*   _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,  10,   9,  11,  10, },
+		/*   _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,   5,  -1,   6,  -1,  -1,   7,  -1,  -1,   8,  -1,   9, },
+		/*    _F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   9,   8,  10,   9, },
+		/*   _FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,   5,  -1,  -1,   6,  -1,  -1,   7,  -1,   8, },
+		/*     F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   8,   7,   9,   8, },
+		/*    FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,  -1,   5,  -1,  -1,   6,  -1,   7, },
+		/*   _FX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   7,   6,   8,   7, },
+		/*  _FXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,  -1,   4,  -1,  -1,   5,  -1,   6, },
+		/*    FD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   6,   5,   7,   6, },
+		/*  _FDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,  -1,   3,  -1,  -1,   4,  -1,   5, },
+		/*     D */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   5,   4,   6,   5, },
+		/*    DC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,  -1,   2,  -1,  -1,   3,  -1,   4, },
+		/*  F80X */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   4,   3,   5,   4, },
+		/* _FDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   1,  -1,  -1,   2,  -1,   3, },
 		/*   F80*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   1,   0,   1,   2,   2,   3,   3,   4,   4, },
-		/*   _FB*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3, },
-		/* _FLDC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   1,  -1,   2, },
-		/*    FB*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   1,   0,   1,   2,   2,   3, },
-		/*    LD*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2, },
-		/*   LDC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1, },
-		/*  _FBX*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1, },
-		/*_FLDXC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0, },
+		/*   _FB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3, },
+		/* _FLDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   1,  -1,   2, },
+		/*    FB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   1,   0,   1,   2,   2,   3, },
+		/*    LD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2, },
+		/*   LDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1, },
+		/*  _FBX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1, },
+		/* _FLDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0, },
 	}; // costMatrix
 	static const int maxIntCost = 15;
 	// GENERATED END
 	static_assert(
-		sizeof(costMatrix)/sizeof(costMatrix[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES*BasicType::NUMBER_OF_BASIC_TYPES,
+		sizeof(costMatrix)/sizeof(costMatrix[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES * BasicType::NUMBER_OF_BASIC_TYPES,
 		"Missing row in the cost matrix"
 	);
@@ -266,44 +266,44 @@
 	static const int signMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion
 		/*             B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
-		/*     B*/ {   0,   0,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*     C*/ {  -1,   0,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*    SC*/ {  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*    UC*/ {  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*    SI*/ {  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*   SUI*/ {  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*     I*/ {  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*    UI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*    LI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*   LUI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*   LLI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*  LLUI*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*    IB*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*   UIB*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*   _FH*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*   _FH*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
-		/*    _F*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*   _FC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
-		/*     F*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*    FC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
-		/*   _FX*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*  _FXC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
-		/*    FD*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*  _FDC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
-		/*     D*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*    DC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
-		/*  F80X*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/* _FDXC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
+		/*     B */ {   0,   0,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*     C */ {  -1,   0,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*    SC */ {  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*    UC */ {  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*    SI */ {  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*   SUI */ {  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*     I */ {  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*    UI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*    LI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*   LUI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*   LLI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*  LLUI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*    IB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*   UIB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*   _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*   _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
+		/*    _F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*   _FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
+		/*     F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*    FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
+		/*   _FX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*  _FXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
+		/*    FD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*  _FDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
+		/*     D */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/*    DC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
+		/*  F80X */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
+		/* _FDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
 		/*   F80*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
-		/*   _FB*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0, },
-		/* _FLDC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
-		/*    FB*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0, },
-		/*    LD*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0, },
-		/*   LDC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0, },
-		/*  _FBX*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0, },
-		/*_FLDXC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0, },
+		/*   _FB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0, },
+		/* _FLDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
+		/*    FB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0, },
+		/*    LD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0, },
+		/*   LDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0, },
+		/*  _FBX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0, },
+		/* _FLDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0, },
 	}; // signMatrix
 	// GENERATED END
 	static_assert(
-		sizeof(signMatrix)/sizeof(signMatrix[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES*BasicType::NUMBER_OF_BASIC_TYPES,
+		sizeof(signMatrix)/sizeof(signMatrix[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES * BasicType::NUMBER_OF_BASIC_TYPES,
 		"Missing row in the sign matrix"
 	);
@@ -313,6 +313,6 @@
 	}
 
-	void ConversionCost::postvisit(const BasicType *basicType) {
-		if ( const BasicType * destAsBasic = dynamic_cast< const BasicType* >( dest ) ) {
+	void ConversionCost::postvisit(const BasicType * basicType) {
+		if ( const BasicType * destAsBasic = dynamic_cast< const BasicType * >( dest ) ) {
 			int tableResult = costMatrix[ basicType->kind ][ destAsBasic->kind ];
 			if ( tableResult == -1 ) {
@@ -331,5 +331,5 @@
 
 	void ConversionCost::postvisit( const PointerType * pointerType ) {
-		if ( const PointerType *destAsPtr = dynamic_cast< const PointerType * >( dest ) ) {
+		if ( const PointerType * destAsPtr = dynamic_cast< const PointerType * >( dest ) ) {
 			PRINT( std::cerr << pointerType << " ===> " << destAsPtr << std::endl; )
 			Type::Qualifiers tq1 = pointerType->base->tq;
@@ -385,5 +385,5 @@
 
 	void ConversionCost::postvisit( const StructInstType * inst ) {
-		if ( const StructInstType *destAsInst = dynamic_cast< const StructInstType * >( dest ) ) {
+		if ( const StructInstType * destAsInst = dynamic_cast< const StructInstType * >( dest ) ) {
 			if ( inst->name == destAsInst->name ) {
 				cost = Cost::zero;
@@ -393,5 +393,5 @@
 
 	void ConversionCost::postvisit( const UnionInstType * inst ) {
-		if ( const UnionInstType *destAsInst = dynamic_cast< const UnionInstType * >( dest ) ) {
+		if ( const UnionInstType * destAsInst = dynamic_cast< const UnionInstType * >( dest ) ) {
 			if ( inst->name == destAsInst->name ) {
 				cost = Cost::zero;
@@ -411,13 +411,13 @@
 	void ConversionCost::postvisit( const TraitInstType * ) {}
 
-	void ConversionCost::postvisit( const TypeInstType *inst ) {
-		if ( const EqvClass *eqvClass = env.lookup( inst->name ) ) {
+	void ConversionCost::postvisit( const TypeInstType * inst ) {
+		if ( const EqvClass * eqvClass = env.lookup( inst->name ) ) {
 			cost = costFunc( eqvClass->type, dest, indexer, env );
-		} else if ( const TypeInstType *destAsInst = dynamic_cast< const TypeInstType* >( dest ) ) {
+		} else if ( const TypeInstType * destAsInst = dynamic_cast< const TypeInstType * >( dest ) ) {
 			if ( inst->name == destAsInst->name ) {
 				cost = Cost::zero;
 			}
-		} else if ( NamedTypeDecl *namedType = indexer.lookupType( inst->name ) ) {
-			const TypeDecl *type = dynamic_cast< const TypeDecl* >( namedType );
+		} else if ( const NamedTypeDecl * namedType = indexer.lookupType( inst->name ) ) {
+			const TypeDecl * type = dynamic_cast< const TypeDecl * >( namedType );
 			// all typedefs should be gone by this point
 			assert( type );
@@ -434,5 +434,5 @@
 			std::list< Type * >::const_iterator destIt = destAsTuple->types.begin();
 			while ( srcIt != tupleType->types.end() && destIt != destAsTuple->types.end() ) {
-				Cost newCost = costFunc( *srcIt++, *destIt++, indexer, env );
+				Cost newCost = costFunc( * srcIt++, * destIt++, indexer, env );
 				if ( newCost == Cost::infinity ) {
 					return;
@@ -449,5 +449,5 @@
 
 	void ConversionCost::postvisit( const VarArgsType * ) {
-		if ( dynamic_cast< const VarArgsType* >( dest ) ) {
+		if ( dynamic_cast< const VarArgsType * >( dest ) ) {
 			cost = Cost::zero;
 		}
@@ -457,6 +457,6 @@
 		if ( dynamic_cast< const ZeroType * >( dest ) ) {
 			cost = Cost::zero;
-		} else if ( const BasicType *destAsBasic = dynamic_cast< const BasicType* >( dest ) ) {
-			// copied from visit(BasicType*) for signed int, but +1 for safe conversions
+		} else if ( const BasicType * destAsBasic = dynamic_cast< const BasicType * >( dest ) ) {
+			// copied from visit(BasicType *) for signed int, but +1 for safe conversions
 			int tableResult = costMatrix[ BasicType::SignedInt ][ destAsBasic->kind ];
 			if ( tableResult == -1 ) {
@@ -467,5 +467,5 @@
 				cost.incSign( signMatrix[ BasicType::SignedInt ][ destAsBasic->kind ] );
 			} // if
-		} else if ( dynamic_cast< const PointerType* >( dest ) ) {
+		} else if ( dynamic_cast< const PointerType * >( dest ) ) {
 			cost = Cost::zero;
 			cost.incSafe( maxIntCost + 2 ); // +1 for zero_t -> int, +1 for disambiguation
@@ -477,5 +477,5 @@
 			cost = Cost::zero;
 		} else if ( const BasicType * destAsBasic = dynamic_cast< const BasicType * >( dest ) ) {
-			// copied from visit(BasicType*) for signed int, but +1 for safe conversions
+			// copied from visit(BasicType *) for signed int, but +1 for safe conversions
 			int tableResult = costMatrix[ BasicType::SignedInt ][ destAsBasic->kind ];
 			if ( tableResult == -1 ) {
@@ -729,5 +729,5 @@
 		auto dstEnd = dstAsTuple->types.end();
 		while ( srcIt != srcEnd && dstIt != dstEnd ) {
-			Cost newCost = costCalc( *srcIt++, *dstIt++, symtab, env );
+			Cost newCost = costCalc( * srcIt++, * dstIt++, symtab, env );
 			if ( newCost == Cost::infinity ) {
 				return;
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 7870799883ca946218c97fb6a189d1da90a16e8e)
+++ src/ResolvExpr/Resolver.cc	(revision ef5b8288bd2be4816de42f8ea6a9b3d5e5971b31)
@@ -562,6 +562,5 @@
 		// TODO: Replace *exception type with &exception type.
 		if ( throwStmt->get_expr() ) {
-			StructDecl * exception_decl =
-				indexer.lookupStruct( "__cfaabi_ehm__base_exception_t" );
+			StructDecl * exception_decl = indexer.lookupMutableStruct( "__cfaabi_ehm__base_exception_t" );
 			assert( exception_decl );
 			Type * exceptType = new PointerType( noQualifiers, new StructInstType( noQualifiers, exception_decl ) );
@@ -972,5 +971,5 @@
 		/// Calls the CandidateFinder and finds the single best candidate
 		CandidateRef findUnfinishedKindExpression(
-			const ast::Expr * untyped, const ast::SymbolTable & symtab, const std::string & kind, 
+			const ast::Expr * untyped, const ast::SymbolTable & symtab, const std::string & kind,
 			std::function<bool(const Candidate &)> pred = anyCandidate, ResolvMode mode = {}
 		) {
@@ -994,6 +993,6 @@
 			// produce invalid error if no candidates
 			if ( candidates.empty() ) {
-				SemanticError( untyped, 
-					toString( "No reasonable alternatives for ", kind, (kind != "" ? " " : ""), 
+				SemanticError( untyped,
+					toString( "No reasonable alternatives for ", kind, (kind != "" ? " " : ""),
 					"expression: ") );
 			}
@@ -1031,5 +1030,5 @@
 			if ( winners.size() != 1 ) {
 				std::ostringstream stream;
-				stream << "Cannot choose between " << winners.size() << " alternatives for " 
+				stream << "Cannot choose between " << winners.size() << " alternatives for "
 					<< kind << (kind != "" ? " " : "") << "expression\n";
 				ast::print( stream, untyped );
@@ -1054,10 +1053,10 @@
 		struct StripCasts_new final {
 			const ast::Expr * postmutate( const ast::CastExpr * castExpr ) {
-				if ( 
-					castExpr->isGenerated 
-					&& typesCompatible( castExpr->arg->result, castExpr->result ) 
+				if (
+					castExpr->isGenerated
+					&& typesCompatible( castExpr->arg->result, castExpr->result )
 				) {
 					// generated cast is the same type as its argument, remove it after keeping env
-					return ast::mutate_field( 
+					return ast::mutate_field(
 						castExpr->arg.get(), &ast::Expr::env, castExpr->env );
 				}
@@ -1088,10 +1087,10 @@
 
 		/// Establish post-resolver invariants for expressions
-		void finishExpr( 
-			ast::ptr< ast::Expr > & expr, const ast::TypeEnvironment & env, 
+		void finishExpr(
+			ast::ptr< ast::Expr > & expr, const ast::TypeEnvironment & env,
 			const ast::TypeSubstitution * oldenv = nullptr
 		) {
 			// set up new type substitution for expression
-			ast::ptr< ast::TypeSubstitution > newenv = 
+			ast::ptr< ast::TypeSubstitution > newenv =
 				 oldenv ? oldenv : new ast::TypeSubstitution{};
 			env.writeToSubstitution( *newenv.get_and_mutate() );
@@ -1102,15 +1101,15 @@
 	} // anonymous namespace
 
-		
+
 	ast::ptr< ast::Expr > resolveInVoidContext(
 		const ast::Expr * expr, const ast::SymbolTable & symtab, ast::TypeEnvironment & env
 	) {
 		assertf( expr, "expected a non-null expression" );
-		
+
 		// set up and resolve expression cast to void
 		ast::CastExpr * untyped = new ast::CastExpr{ expr };
-		CandidateRef choice = findUnfinishedKindExpression( 
+		CandidateRef choice = findUnfinishedKindExpression(
 			untyped, symtab, "", anyCandidate, ResolvMode::withAdjustment() );
-		
+
 		// a cast expression has either 0 or 1 interpretations (by language rules);
 		// if 0, an exception has already been thrown, and this code will not run
@@ -1122,7 +1121,7 @@
 
 	namespace {
-		/// Resolve `untyped` to the expression whose candidate is the best match for a `void` 
+		/// Resolve `untyped` to the expression whose candidate is the best match for a `void`
 		/// context.
-		ast::ptr< ast::Expr > findVoidExpression( 
+		ast::ptr< ast::Expr > findVoidExpression(
 			const ast::Expr * untyped, const ast::SymbolTable & symtab
 		) {
@@ -1134,13 +1133,13 @@
 		}
 
-		/// resolve `untyped` to the expression whose candidate satisfies `pred` with the 
+		/// resolve `untyped` to the expression whose candidate satisfies `pred` with the
 		/// lowest cost, returning the resolved version
 		ast::ptr< ast::Expr > findKindExpression(
-			const ast::Expr * untyped, const ast::SymbolTable & symtab, 
-			std::function<bool(const Candidate &)> pred = anyCandidate, 
+			const ast::Expr * untyped, const ast::SymbolTable & symtab,
+			std::function<bool(const Candidate &)> pred = anyCandidate,
 			const std::string & kind = "", ResolvMode mode = {}
 		) {
 			if ( ! untyped ) return {};
-			CandidateRef choice = 
+			CandidateRef choice =
 				findUnfinishedKindExpression( untyped, symtab, kind, pred, mode );
 			finishExpr( choice->expr, choice->env, untyped->env );
@@ -1149,6 +1148,6 @@
 
 		/// Resolve `untyped` to the single expression whose candidate is the best match
-		ast::ptr< ast::Expr > findSingleExpression( 
-			const ast::Expr * untyped, const ast::SymbolTable & symtab 
+		ast::ptr< ast::Expr > findSingleExpression(
+			const ast::Expr * untyped, const ast::SymbolTable & symtab
 		) {
 			return findKindExpression( untyped, symtab );
@@ -1170,9 +1169,9 @@
 		bool hasIntegralType( const Candidate & i ) {
 			const ast::Type * type = i.expr->result;
-			
+
 			if ( auto bt = dynamic_cast< const ast::BasicType * >( type ) ) {
 				return bt->isInteger();
-			} else if ( 
-				dynamic_cast< const ast::EnumInstType * >( type ) 
+			} else if (
+				dynamic_cast< const ast::EnumInstType * >( type )
 				|| dynamic_cast< const ast::ZeroType * >( type )
 				|| dynamic_cast< const ast::OneType * >( type )
@@ -1183,6 +1182,6 @@
 
 		/// Resolve `untyped` as an integral expression, returning the resolved version
-		ast::ptr< ast::Expr > findIntegralExpression( 
-			const ast::Expr * untyped, const ast::SymbolTable & symtab 
+		ast::ptr< ast::Expr > findIntegralExpression(
+			const ast::Expr * untyped, const ast::SymbolTable & symtab
 		) {
 			return findKindExpression( untyped, symtab, hasIntegralType, "condition" );
@@ -1192,6 +1191,6 @@
 		bool isCharType( const ast::Type * t ) {
 			if ( auto bt = dynamic_cast< const ast::BasicType * >( t ) ) {
-				return bt->kind == ast::BasicType::Char 
-					|| bt->kind == ast::BasicType::SignedChar 
+				return bt->kind == ast::BasicType::Char
+					|| bt->kind == ast::BasicType::SignedChar
 					|| bt->kind == ast::BasicType::UnsignedChar;
 			}
@@ -1253,6 +1252,6 @@
 	}
 
-	ast::ptr< ast::Init > resolveCtorInit( 
-		const ast::ConstructorInit * ctorInit, const ast::SymbolTable & symtab 
+	ast::ptr< ast::Init > resolveCtorInit(
+		const ast::ConstructorInit * ctorInit, const ast::SymbolTable & symtab
 	) {
 		assert( ctorInit );
@@ -1261,6 +1260,6 @@
 	}
 
-	ast::ptr< ast::Expr > resolveStmtExpr( 
-		const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab 
+	ast::ptr< ast::Expr > resolveStmtExpr(
+		const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab
 	) {
 		assert( stmtExpr );
@@ -1303,16 +1302,16 @@
 
 	void Resolver_new::previsit( const ast::ObjectDecl * objectDecl ) {
-		// To handle initialization of routine pointers [e.g. int (*fp)(int) = foo()], 
-		// class-variable `initContext` is changed multiple times because the LHS is analyzed 
-		// twice. The second analysis changes `initContext` because a function type can contain 
-		// object declarations in the return and parameter types. Therefore each value of 
-		// `initContext` is retained so the type on the first analysis is preserved and used for 
+		// To handle initialization of routine pointers [e.g. int (*fp)(int) = foo()],
+		// class-variable `initContext` is changed multiple times because the LHS is analyzed
+		// twice. The second analysis changes `initContext` because a function type can contain
+		// object declarations in the return and parameter types. Therefore each value of
+		// `initContext` is retained so the type on the first analysis is preserved and used for
 		// selecting the RHS.
 		GuardValue( currentObject );
 		currentObject = ast::CurrentObject{ objectDecl->location, objectDecl->get_type() };
 		if ( inEnumDecl && dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() ) ) {
-			// enumerator initializers should not use the enum type to initialize, since the 
+			// enumerator initializers should not use the enum type to initialize, since the
 			// enum type is still incomplete at this point. Use `int` instead.
-			currentObject = ast::CurrentObject{ 
+			currentObject = ast::CurrentObject{
 				objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } };
 		}
@@ -1325,9 +1324,9 @@
 	}
 
-	const ast::StaticAssertDecl * Resolver_new::previsit( 
-		const ast::StaticAssertDecl * assertDecl 
+	const ast::StaticAssertDecl * Resolver_new::previsit(
+		const ast::StaticAssertDecl * assertDecl
 	) {
-		return ast::mutate_field( 
-			assertDecl, &ast::StaticAssertDecl::cond, 
+		return ast::mutate_field(
+			assertDecl, &ast::StaticAssertDecl::cond,
 			findIntegralExpression( assertDecl->cond, symtab ) );
 	}
@@ -1338,6 +1337,6 @@
 			#warning should use new equivalent to Validate::SizeType rather than sizeType here
 			ast::ptr< ast::Type > sizeType = new ast::BasicType{ ast::BasicType::LongUnsignedInt };
-			ast::mutate_field( 
-				type, &PtrType::dimension, 
+			ast::mutate_field(
+				type, &PtrType::dimension,
 				findSingleExpression( type->dimension, sizeType, symtab ) );
 		}
@@ -1356,6 +1355,6 @@
 		visit_children = false;
 		assertf( exprStmt->expr, "ExprStmt has null expression in resolver" );
-		
-		return ast::mutate_field( 
+
+		return ast::mutate_field(
 			exprStmt, &ast::ExprStmt::expr, findVoidExpression( exprStmt->expr, symtab ) );
 	}
@@ -1364,12 +1363,12 @@
 		visit_children = false;
 
-		asmExpr = ast::mutate_field( 
+		asmExpr = ast::mutate_field(
 			asmExpr, &ast::AsmExpr::operand, findVoidExpression( asmExpr->operand, symtab ) );
-		
+
 		if ( asmExpr->inout ) {
 			asmExpr = ast::mutate_field(
 				asmExpr, &ast::AsmExpr::inout, findVoidExpression( asmExpr->inout, symtab ) );
 		}
-		
+
 		return asmExpr;
 	}
@@ -1388,5 +1387,5 @@
 
 	const ast::WhileStmt * Resolver_new::previsit( const ast::WhileStmt * whileStmt ) {
-		return ast::mutate_field( 
+		return ast::mutate_field(
 			whileStmt, &ast::WhileStmt::cond, findIntegralExpression( whileStmt->cond, symtab ) );
 	}
@@ -1409,5 +1408,5 @@
 		GuardValue( currentObject );
 		switchStmt = ast::mutate_field(
-			switchStmt, &ast::SwitchStmt::cond, 
+			switchStmt, &ast::SwitchStmt::cond,
 			findIntegralExpression( switchStmt->cond, symtab ) );
 		currentObject = ast::CurrentObject{ switchStmt->location, switchStmt->cond->result };
@@ -1420,15 +1419,15 @@
 			assertf( initAlts.size() == 1, "SwitchStmt did not correctly resolve an integral "
 				"expression." );
-			
-			ast::ptr< ast::Expr > untyped = 
+
+			ast::ptr< ast::Expr > untyped =
 				new ast::CastExpr{ caseStmt->location, caseStmt->cond, initAlts.front().type };
 			ast::ptr< ast::Expr > newExpr = findSingleExpression( untyped, symtab );
-			
-			// case condition cannot have a cast in C, so it must be removed here, regardless of 
+
+			// case condition cannot have a cast in C, so it must be removed here, regardless of
 			// whether it would perform a conversion.
 			if ( const ast::CastExpr * castExpr = newExpr.as< ast::CastExpr >() ) {
 				swap_and_save_env( newExpr, castExpr->arg );
 			}
-			
+
 			caseStmt = ast::mutate_field( caseStmt, &ast::CaseStmt::cond, newExpr );
 		}
@@ -1443,5 +1442,5 @@
 			ast::ptr< ast::Type > target = new ast::PointerType{ new ast::VoidType{} };
 			branchStmt = ast::mutate_field(
-				branchStmt, &ast::BranchStmt::computedTarget, 
+				branchStmt, &ast::BranchStmt::computedTarget,
 				findSingleExpression( branchStmt->computedTarget, target, symtab ) );
 		}
@@ -1453,5 +1452,5 @@
 		if ( returnStmt->expr ) {
 			returnStmt = ast::mutate_field(
-				returnStmt, &ast::ReturnStmt::expr, 
+				returnStmt, &ast::ReturnStmt::expr,
 				findSingleExpression( returnStmt->expr, functionReturn, symtab ) );
 		}
@@ -1462,11 +1461,11 @@
 		visit_children = false;
 		if ( throwStmt->expr ) {
-			const ast::StructDecl * exceptionDecl = 
+			const ast::StructDecl * exceptionDecl =
 				symtab.lookupStruct( "__cfaabi_ehm__base_exception_t" );
 			assert( exceptionDecl );
-			ast::ptr< ast::Type > exceptType = 
+			ast::ptr< ast::Type > exceptType =
 				new ast::PointerType{ new ast::StructInstType{ exceptionDecl } };
 			throwStmt = ast::mutate_field(
-				throwStmt, &ast::ThrowStmt::expr, 
+				throwStmt, &ast::ThrowStmt::expr,
 				findSingleExpression( throwStmt->expr, exceptType, symtab ) );
 		}
@@ -1477,6 +1476,6 @@
 		if ( catchStmt->cond ) {
 			ast::ptr< ast::Type > boolType = new ast::BasicType{ ast::BasicType::Bool };
-			catchStmt = ast::mutate_field( 
-				catchStmt, &ast::CatchStmt::cond, 
+			catchStmt = ast::mutate_field(
+				catchStmt, &ast::CatchStmt::cond,
 				findSingleExpression( catchStmt->cond, boolType, symtab ) );
 		}
@@ -1506,12 +1505,12 @@
 
 			if ( clause.target.args.empty() ) {
-				SemanticError( stmt->location, 
+				SemanticError( stmt->location,
 					"Waitfor clause must have at least one mutex parameter");
 			}
 
 			// Find all alternatives for all arguments in canonical form
-			std::vector< CandidateFinder > argFinders = 
+			std::vector< CandidateFinder > argFinders =
 				funcFinder.findSubExprs( clause.target.args );
-			
+
 			// List all combinations of arguments
 			std::vector< CandidateList > possibilities;
@@ -1519,5 +1518,5 @@
 
 			// For every possible function:
-			// * try matching the arguments to the parameters, not the other way around because 
+			// * try matching the arguments to the parameters, not the other way around because
 			//   more arguments than parameters
 			CandidateList funcCandidates;
@@ -1526,8 +1525,8 @@
 			for ( CandidateRef & func : funcFinder.candidates ) {
 				try {
-					auto pointerType = dynamic_cast< const ast::PointerType * >( 
+					auto pointerType = dynamic_cast< const ast::PointerType * >(
 						func->expr->result->stripReferences() );
 					if ( ! pointerType ) {
-						SemanticError( stmt->location, func->expr->result.get(), 
+						SemanticError( stmt->location, func->expr->result.get(),
 							"candidate not viable: not a pointer type\n" );
 					}
@@ -1535,5 +1534,5 @@
 					auto funcType = pointerType->base.as< ast::FunctionType >();
 					if ( ! funcType ) {
-						SemanticError( stmt->location, func->expr->result.get(), 
+						SemanticError( stmt->location, func->expr->result.get(),
 							"candidate not viable: not a function type\n" );
 					}
@@ -1544,5 +1543,5 @@
 
 						if( ! nextMutex( param, paramEnd ) ) {
-							SemanticError( stmt->location, funcType, 
+							SemanticError( stmt->location, funcType,
 								"candidate function not viable: no mutex parameters\n");
 						}
@@ -1560,5 +1559,5 @@
 							ast::AssertionSet need, have;
 							ast::TypeEnvironment resultEnv{ func->env };
-							// Add all type variables as open so that those not used in the 
+							// Add all type variables as open so that those not used in the
 							// parameter list are still considered open
 							resultEnv.add( funcType->forall );
@@ -1580,5 +1579,5 @@
 							unsigned n_mutex_param = 0;
 
-							// For every argument of its set, check if it matches one of the 
+							// For every argument of its set, check if it matches one of the
 							// parameters. The order is important
 							for ( auto & arg : argsList ) {
@@ -1587,5 +1586,5 @@
 									// We ran out of parameters but still have arguments.
 									// This function doesn't match
-									SemanticError( stmt->location, funcType, 
+									SemanticError( stmt->location, funcType,
 										toString("candidate function not viable: too many mutex "
 										"arguments, expected ", n_mutex_param, "\n" ) );
@@ -1594,11 +1593,11 @@
 								++n_mutex_param;
 
-								// Check if the argument matches the parameter type in the current 
+								// Check if the argument matches the parameter type in the current
 								// scope
 								ast::ptr< ast::Type > paramType = (*param)->get_type();
-								if ( 
-									! unify( 
-										arg->expr->result, paramType, resultEnv, need, have, open, 
-										symtab ) 
+								if (
+									! unify(
+										arg->expr->result, paramType, resultEnv, need, have, open,
+										symtab )
 								) {
 									// Type doesn't match
@@ -1627,7 +1626,7 @@
 								} while ( nextMutex( param, paramEnd ) );
 
-								// We ran out of arguments but still have parameters left; this 
+								// We ran out of arguments but still have parameters left; this
 								// function doesn't match
-								SemanticError( stmt->location, funcType, 
+								SemanticError( stmt->location, funcType,
 									toString( "candidate function not viable: too few mutex "
 									"arguments, expected ", n_mutex_param, "\n" ) );
@@ -1657,5 +1656,5 @@
 			// Make sure correct number of arguments
 			if( funcCandidates.empty() ) {
-				SemanticErrorException top( stmt->location, 
+				SemanticErrorException top( stmt->location,
 					"No alternatives for function in call to waitfor" );
 				top.append( errors );
@@ -1664,6 +1663,6 @@
 
 			if( argsCandidates.empty() ) {
-				SemanticErrorException top( stmt->location, 
-					"No alternatives for arguments in call to waitfor" ); 
+				SemanticErrorException top( stmt->location,
+					"No alternatives for arguments in call to waitfor" );
 				top.append( errors );
 				throw top;
@@ -1671,5 +1670,5 @@
 
 			if( funcCandidates.size() > 1 ) {
-				SemanticErrorException top( stmt->location, 
+				SemanticErrorException top( stmt->location,
 					"Ambiguous function in call to waitfor" );
 				top.append( errors );
@@ -1686,7 +1685,7 @@
 			// build new clause
 			ast::WaitForStmt::Clause clause2;
-			
+
 			clause2.target.func = funcCandidates.front()->expr;
-			
+
 			clause2.target.args.reserve( clause.target.args.size() );
 			for ( auto arg : argsCandidates.front() ) {
@@ -1708,5 +1707,5 @@
 			ast::WaitForStmt::Timeout timeout2;
 
-			ast::ptr< ast::Type > target = 
+			ast::ptr< ast::Type > target =
 				new ast::BasicType{ ast::BasicType::LongLongUnsignedInt };
 			timeout2.time = findSingleExpression( stmt->timeout.time, target, symtab );
@@ -1740,7 +1739,7 @@
 	const ast::SingleInit * Resolver_new::previsit( const ast::SingleInit * singleInit ) {
 		visit_children = false;
-		// resolve initialization using the possibilities as determined by the `currentObject` 
+		// resolve initialization using the possibilities as determined by the `currentObject`
 		// cursor.
-		ast::ptr< ast::Expr > untyped = new ast::UntypedInitExpr{ 
+		ast::ptr< ast::Expr > untyped = new ast::UntypedInitExpr{
 			singleInit->location, singleInit->value, currentObject.getOptions() };
 		ast::ptr<ast::Expr> newExpr = findSingleExpression( untyped, symtab );
@@ -1751,6 +1750,6 @@
 
 		// discard InitExpr wrapper and retain relevant pieces.
-		// `initExpr` may have inferred params in the case where the expression specialized a 
-		// function pointer, and newExpr may already have inferParams of its own, so a simple 
+		// `initExpr` may have inferred params in the case where the expression specialized a
+		// function pointer, and newExpr may already have inferParams of its own, so a simple
 		// swap is not sufficient
 		ast::Expr::InferUnion inferred = initExpr->inferred;
@@ -1758,5 +1757,5 @@
 		newExpr.get_and_mutate()->inferred.splice( std::move(inferred) );
 
-		// get the actual object's type (may not exactly match what comes back from the resolver 
+		// get the actual object's type (may not exactly match what comes back from the resolver
 		// due to conversions)
 		const ast::Type * initContext = currentObject.getCurrentType();
@@ -1770,5 +1769,5 @@
 				if ( auto pt = newExpr->result.as< ast::PointerType >() ) {
 					if ( isCharType( pt->base ) ) {
-						// strip cast if we're initializing a char[] with a char* 
+						// strip cast if we're initializing a char[] with a char*
 						// e.g. char x[] = "hello"
 						if ( auto ce = newExpr.as< ast::CastExpr >() ) {
@@ -1793,8 +1792,8 @@
 		assert( listInit->designations.size() == listInit->initializers.size() );
 		for ( unsigned i = 0; i < listInit->designations.size(); ++i ) {
-			// iterate designations and initializers in pairs, moving the cursor to the current 
+			// iterate designations and initializers in pairs, moving the cursor to the current
 			// designated object and resolving the initializer against that object
 			listInit = ast::mutate_field_index(
-				listInit, &ast::ListInit::designations, i, 
+				listInit, &ast::ListInit::designations, i,
 				currentObject.findNext( listInit->designations[i] ) );
 			listInit = ast::mutate_field_index(
@@ -1818,6 +1817,6 @@
 		ctorInit = ast::mutate_field( ctorInit, &ast::ConstructorInit::init, nullptr );
 
-		// intrinsic single-parameter constructors and destructors do nothing. Since this was 
-		// implicitly generated, there's no way for it to have side effects, so get rid of it to 
+		// intrinsic single-parameter constructors and destructors do nothing. Since this was
+		// implicitly generated, there's no way for it to have side effects, so get rid of it to
 		// clean up generated code
 		if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit->ctor ) ) {
Index: src/SymTab/Indexer.cc
===================================================================
--- src/SymTab/Indexer.cc	(revision 7870799883ca946218c97fb6a189d1da90a16e8e)
+++ src/SymTab/Indexer.cc	(revision ef5b8288bd2be4816de42f8ea6a9b3d5e5971b31)
@@ -74,7 +74,7 @@
 	}
 
-	Indexer::Indexer() 
-	: idTable(), typeTable(), structTable(), enumTable(), unionTable(), traitTable(), 
-	  prevScope(), scope( 0 ), repScope( 0 ) { ++*stats().count; }
+	Indexer::Indexer()
+	: idTable(), typeTable(), structTable(), enumTable(), unionTable(), traitTable(),
+	  prevScope(), scope( 0 ), repScope( 0 ) { ++* stats().count; }
 
 	Indexer::~Indexer() {
@@ -84,7 +84,7 @@
 	void Indexer::lazyInitScope() {
 		if ( repScope < scope ) {
-			++*stats().lazy_scopes;
+			++* stats().lazy_scopes;
 			// create rollback
-			prevScope = std::make_shared<Indexer>( *this );
+			prevScope = std::make_shared<Indexer>( * this );
 			// update repScope
 			repScope = scope;
@@ -95,5 +95,5 @@
 		++scope;
 
-		++*stats().new_scopes;
+		++* stats().new_scopes;
 		stats().avg_scope_depth->push( scope );
 		stats().max_scope_depth->push( scope );
@@ -103,5 +103,5 @@
 		if ( repScope == scope ) {
 			Ptr prev = prevScope;           // make sure prevScope stays live
-			*this = std::move(*prevScope);  // replace with previous scope
+			* this = std::move(* prevScope);  // replace with previous scope
 		}
 
@@ -109,9 +109,9 @@
 	}
 
-	void Indexer::lookupId( const std::string &id, std::list< IdData > &out ) const {
-		++*stats().lookup_calls;
+	void Indexer::lookupId( const std::string & id, std::list< IdData > &out ) const {
+		++* stats().lookup_calls;
 		if ( ! idTable ) return;
 
-		++*stats().map_lookups;
+		++* stats().map_lookups;
 		auto decls = idTable->find( id );
 		if ( decls == idTable->end() ) return;
@@ -122,48 +122,53 @@
 	}
 
-	NamedTypeDecl *Indexer::lookupType( const std::string &id ) const {
-		++*stats().lookup_calls;
+	const NamedTypeDecl * Indexer::lookupType( const std::string & id ) const { return lookupMutableType(id); }
+	NamedTypeDecl * Indexer::lookupMutableType( const std::string & id ) const {
+		++* stats().lookup_calls;
 		if ( ! typeTable ) return nullptr;
-		++*stats().map_lookups;
+		++* stats().map_lookups;
 		auto it = typeTable->find( id );
 		return it == typeTable->end() ? nullptr : it->second.decl;
 	}
 
-	StructDecl *Indexer::lookupStruct( const std::string &id ) const {
-		++*stats().lookup_calls;
+	const StructDecl * Indexer::lookupStruct( const std::string & id ) const { return lookupMutableStruct(id); }
+	StructDecl * Indexer::lookupMutableStruct( const std::string & id ) const {
+		++* stats().lookup_calls;
 		if ( ! structTable ) return nullptr;
-		++*stats().map_lookups;
+		++* stats().map_lookups;
 		auto it = structTable->find( id );
 		return it == structTable->end() ? nullptr : it->second.decl;
 	}
 
-	EnumDecl *Indexer::lookupEnum( const std::string &id ) const {
-		++*stats().lookup_calls;
+	const EnumDecl * Indexer::lookupEnum( const std::string & id ) const { return lookupMutableEnum(id); }
+	EnumDecl * Indexer::lookupMutableEnum( const std::string & id ) const {
+		++* stats().lookup_calls;
 		if ( ! enumTable ) return nullptr;
-		++*stats().map_lookups;
+		++* stats().map_lookups;
 		auto it = enumTable->find( id );
 		return it == enumTable->end() ? nullptr : it->second.decl;
 	}
 
-	UnionDecl *Indexer::lookupUnion( const std::string &id ) const {
-		++*stats().lookup_calls;
+	const UnionDecl * Indexer::lookupUnion( const std::string & id ) const { return lookupMutableUnion(id); }
+	UnionDecl * Indexer::lookupMutableUnion( const std::string & id ) const {
+		++* stats().lookup_calls;
 		if ( ! unionTable ) return nullptr;
-		++*stats().map_lookups;
+		++* stats().map_lookups;
 		auto it = unionTable->find( id );
 		return it == unionTable->end() ? nullptr : it->second.decl;
 	}
 
-	TraitDecl *Indexer::lookupTrait( const std::string &id ) const {
-		++*stats().lookup_calls;
+	const TraitDecl * Indexer::lookupTrait( const std::string & id ) const { return lookupMutableTrait(id); }
+	TraitDecl * Indexer::lookupMutableTrait( const std::string & id ) const {
+		++* stats().lookup_calls;
 		if ( ! traitTable ) return nullptr;
-		++*stats().map_lookups;
+		++* stats().map_lookups;
 		auto it = traitTable->find( id );
 		return it == traitTable->end() ? nullptr : it->second.decl;
 	}
 
-	const Indexer* Indexer::atScope( unsigned long target ) const {
+	const Indexer * Indexer::atScope( unsigned long target ) const {
 		// by lazy construction, final indexer in list has repScope 0, cannot be > target
 		// otherwise, will find first scope representing the target
-		const Indexer* indexer = this;
+		const Indexer * indexer = this;
 		while ( indexer->repScope > target ) {
 			indexer = indexer->prevScope.get();
@@ -172,17 +177,17 @@
 	}
 
-	NamedTypeDecl *Indexer::globalLookupType( const std::string &id ) const {
+	const NamedTypeDecl * Indexer::globalLookupType( const std::string & id ) const {
 		return atScope( 0 )->lookupType( id );
 	}
 
-	StructDecl *Indexer::globalLookupStruct( const std::string &id ) const {
+	const StructDecl * Indexer::globalLookupStruct( const std::string & id ) const {
 		return atScope( 0 )->lookupStruct( id );
 	}
 
-	UnionDecl *Indexer::globalLookupUnion( const std::string &id ) const {
+	const UnionDecl * Indexer::globalLookupUnion( const std::string & id ) const {
 		return atScope( 0 )->lookupUnion( id );
 	}
 
-	EnumDecl *Indexer::globalLookupEnum( const std::string &id ) const {
+	const EnumDecl * Indexer::globalLookupEnum( const std::string & id ) const {
 		return atScope( 0 )->lookupEnum( id );
 	}
@@ -207,9 +212,9 @@
 	}
 
-	
-	bool Indexer::addedIdConflicts( 
-			const Indexer::IdData & existing, DeclarationWithType *added, 
+
+	bool Indexer::addedIdConflicts(
+			const Indexer::IdData & existing, DeclarationWithType * added,
 			Indexer::OnConflict handleConflicts, BaseSyntaxNode * deleteStmt ) {
-		// if we're giving the same name mangling to things of different types then there is 
+		// if we're giving the same name mangling to things of different types then there is
 		// something wrong
 		assert( (isObject( added ) && isObject( existing.id ) )
@@ -219,6 +224,6 @@
 			// new definition shadows the autogenerated one, even at the same scope
 			return false;
-		} else if ( LinkageSpec::isMangled( added->linkage ) 
-				|| ResolvExpr::typesCompatible( 
+		} else if ( LinkageSpec::isMangled( added->linkage )
+				|| ResolvExpr::typesCompatible(
 					added->get_type(), existing.id->get_type(), Indexer() ) ) {
 
@@ -238,7 +243,7 @@
 			if ( isDefinition( added ) && isDefinition( existing.id ) ) {
 				if ( handleConflicts.mode == OnConflict::Error ) {
-					SemanticError( added, 
-						isFunction( added ) ? 
-							"duplicate function definition for " : 
+					SemanticError( added,
+						isFunction( added ) ?
+							"duplicate function definition for " :
 							"duplicate object definition for " );
 				}
@@ -255,8 +260,8 @@
 	}
 
-	bool Indexer::hasCompatibleCDecl( const std::string &id, const std::string &mangleName ) const {
+	bool Indexer::hasCompatibleCDecl( const std::string & id, const std::string &mangleName ) const {
 		if ( ! idTable ) return false;
 
-		++*stats().map_lookups;
+		++* stats().map_lookups;
 		auto decls = idTable->find( id );
 		if ( decls == idTable->end() ) return false;
@@ -270,13 +275,13 @@
 			}
 		}
-		
+
 		return false;
 	}
 
-	bool Indexer::hasIncompatibleCDecl( 
-			const std::string &id, const std::string &mangleName ) const {
+	bool Indexer::hasIncompatibleCDecl(
+			const std::string & id, const std::string &mangleName ) const {
 		if ( ! idTable ) return false;
 
-		++*stats().map_lookups;
+		++* stats().map_lookups;
 		auto decls = idTable->find( id );
 		if ( decls == idTable->end() ) return false;
@@ -295,14 +300,14 @@
 
 	/// gets the base type of the first parameter; decl must be a ctor/dtor/assignment function
-	std::string getOtypeKey( FunctionDecl* function ) {
+	std::string getOtypeKey( FunctionDecl * function ) {
 		auto& params = function->type->parameters;
 		assert( ! params.empty() );
 		// use base type of pointer, so that qualifiers on the pointer type aren't considered.
-		Type* base = InitTweak::getPointerBase( params.front()->get_type() );
+		Type * base = InitTweak::getPointerBase( params.front()->get_type() );
 		assert( base );
 		return Mangler::mangle( base );
 	}
 
-	/// gets the declaration for the function acting on a type specified by otype key, 
+	/// gets the declaration for the function acting on a type specified by otype key,
 	/// nullptr if none such
 	FunctionDecl * getFunctionForOtype( DeclarationWithType * decl, const std::string& otypeKey ) {
@@ -312,13 +317,13 @@
 	}
 
-	bool Indexer::removeSpecialOverrides( 
+	bool Indexer::removeSpecialOverrides(
 			Indexer::IdData& data, Indexer::MangleTable::Ptr& mangleTable ) {
-		// if a type contains user defined ctor/dtor/assign, then special rules trigger, which 
-		// determinethe set of ctor/dtor/assign that can be used  by the requester. In particular, 
-		// if the user defines a default ctor, then the generated default ctor is unavailable, 
-		// likewise for copy ctor and dtor. If the user defines any ctor/dtor, then no generated 
-		// field ctors are available. If the user defines any ctor then the generated default ctor 
-		// is unavailable (intrinsic default ctor must be overridden exactly). If the user defines 
-		// anything that looks like a copy constructor, then the generated copy constructor is 
+		// if a type contains user defined ctor/dtor/assign, then special rules trigger, which
+		// determinethe set of ctor/dtor/assign that can be used  by the requester. In particular,
+		// if the user defines a default ctor, then the generated default ctor is unavailable,
+		// likewise for copy ctor and dtor. If the user defines any ctor/dtor, then no generated
+		// field ctors are available. If the user defines any ctor then the generated default ctor
+		// is unavailable (intrinsic default ctor must be overridden exactly). If the user defines
+		// anything that looks like a copy constructor, then the generated copy constructor is
 		// unavailable, and likewise for the assignment operator.
 
@@ -340,6 +345,6 @@
 			std::vector< MangleTable::value_type > deleted;
 			bool alreadyUserDefinedFunc = false;
-			
-			for ( const auto& entry : *mangleTable ) {
+
+			for ( const auto& entry : * mangleTable ) {
 				// skip decls that aren't functions or are for the wrong type
 				FunctionDecl * decl = getFunctionForOtype( entry.second.id, dataOtypeKey );
@@ -368,9 +373,9 @@
 			// perform removals from mangle table, and deletions if necessary
 			for ( const auto& key : removed ) {
-				++*stats().map_mutations;
+				++* stats().map_mutations;
 				mangleTable = mangleTable->erase( key );
 			}
 			if ( ! alreadyUserDefinedFunc ) for ( const auto& entry : deleted ) {
-				++*stats().map_mutations;
+				++* stats().map_mutations;
 				mangleTable = mangleTable->set( entry.first, IdData{ entry.second, function } );
 			}
@@ -379,6 +384,6 @@
 			// if this is the first user-defined function, delete non-user-defined overloads
 			std::vector< MangleTable::value_type > deleted;
-			
-			for ( const auto& entry : *mangleTable ) {
+
+			for ( const auto& entry : * mangleTable ) {
 				// skip decls that aren't functions or are for the wrong type
 				FunctionDecl * decl = getFunctionForOtype( entry.second.id, dataOtypeKey );
@@ -402,5 +407,5 @@
 			// this needs to be a separate loop because of iterator invalidation
 			for ( const auto& entry : deleted ) {
-				++*stats().map_mutations;
+				++* stats().map_mutations;
 				mangleTable = mangleTable->set( entry.first, IdData{ entry.second, function } );
 			}
@@ -408,5 +413,5 @@
 			// this is an overridable generated function
 			// if there already exists a matching user-defined function, delete this appropriately
-			for ( const auto& entry : *mangleTable ) {
+			for ( const auto& entry : * mangleTable ) {
 				// skip decls that aren't functions or are for the wrong type
 				FunctionDecl * decl = getFunctionForOtype( entry.second.id, dataOtypeKey );
@@ -418,5 +423,5 @@
 				if ( dataIsCopyFunc ) {
 					// remove current function if exists a user-defined copy function
-					// since the signatures for copy functions don't need to match exactly, using 
+					// since the signatures for copy functions don't need to match exactly, using
 					// a delete statement is the wrong approach
 					if ( InitTweak::isCopyFunction( decl, decl->name ) ) return false;
@@ -428,19 +433,19 @@
 			}
 		}
-		
+
 		// nothing (more) to fix, return true
 		return true;
 	}
 
-	void Indexer::addId( 
-			DeclarationWithType *decl, OnConflict handleConflicts, Expression * baseExpr, 
+	void Indexer::addId(
+			DeclarationWithType * decl, OnConflict handleConflicts, Expression * baseExpr,
 			BaseSyntaxNode * deleteStmt ) {
-		++*stats().add_calls;
+		++* stats().add_calls;
 		const std::string &name = decl->name;
 		if ( name == "" ) return;
-		
+
 		std::string mangleName;
 		if ( LinkageSpec::isOverridable( decl->linkage ) ) {
-			// mangle the name without including the appropriate suffix, so overridable routines 
+			// mangle the name without including the appropriate suffix, so overridable routines
 			// are placed into the same "bucket" as their user defined versions.
 			mangleName = Mangler::mangle( decl, false );
@@ -449,5 +454,5 @@
 		} // if
 
-		// this ensures that no two declarations with the same unmangled name at the same scope 
+		// this ensures that no two declarations with the same unmangled name at the same scope
 		// both have C linkage
 		if ( LinkageSpec::isMangled( decl->linkage ) ) {
@@ -457,5 +462,5 @@
 			}
 		} else {
-			// NOTE: only correct if name mangling is completely isomorphic to C 
+			// NOTE: only correct if name mangling is completely isomorphic to C
 			// type-compatibility, which it may not be.
 			if ( hasIncompatibleCDecl( name, mangleName ) ) {
@@ -470,5 +475,5 @@
 			mangleTable = MangleTable::new_ptr();
 		} else {
-			++*stats().map_lookups;
+			++* stats().map_lookups;
 			auto decls = idTable->find( name );
 			if ( decls == idTable->end() ) {
@@ -477,5 +482,5 @@
 				mangleTable = decls->second;
 				// skip in-scope repeat declarations of same identifier
-				++*stats().map_lookups;
+				++* stats().map_lookups;
 				auto existing = mangleTable->find( mangleName );
 				if ( existing != mangleTable->end()
@@ -486,9 +491,9 @@
 							// set delete expression for conflicting identifier
 							lazyInitScope();
-							*stats().map_mutations += 2;
+							* stats().map_mutations += 2;
 							idTable = idTable->set(
 								name,
-								mangleTable->set( 
-									mangleName, 
+								mangleTable->set(
+									mangleName,
 									IdData{ existing->second, handleConflicts.deleteStmt } ) );
 						}
@@ -504,5 +509,5 @@
 		// Ensure that auto-generated ctor/dtor/assignment are deleted if necessary
 		if ( ! removeSpecialOverrides( data, mangleTable ) ) return;
-		*stats().map_mutations += 2;
+		* stats().map_mutations += 2;
 		idTable = idTable->set( name, mangleTable->set( mangleName, std::move(data) ) );
 	}
@@ -518,5 +523,5 @@
 	}
 
-	bool addedTypeConflicts( NamedTypeDecl *existing, NamedTypeDecl *added ) {
+	bool addedTypeConflicts( NamedTypeDecl * existing, NamedTypeDecl * added ) {
 		if ( existing->base == nullptr ) {
 			return false;
@@ -530,29 +535,29 @@
 			}
 		}
-		// does not need to be added to the table if both existing and added have a base that are 
+		// does not need to be added to the table if both existing and added have a base that are
 		// the same
 		return true;
 	}
 
-	void Indexer::addType( NamedTypeDecl *decl ) {
-		++*stats().add_calls;
-		const std::string &id = decl->name;
-
-		if ( ! typeTable ) { 
+	void Indexer::addType( NamedTypeDecl * decl ) {
+		++* stats().add_calls;
+		const std::string & id = decl->name;
+
+		if ( ! typeTable ) {
 			typeTable = TypeTable::new_ptr();
 		} else {
-			++*stats().map_lookups;
+			++* stats().map_lookups;
 			auto existing = typeTable->find( id );
-			if ( existing != typeTable->end() 
-				&& existing->second.scope == scope 
+			if ( existing != typeTable->end()
+				&& existing->second.scope == scope
 				&& addedTypeConflicts( existing->second.decl, decl ) ) return;
 		}
-		
+
 		lazyInitScope();
-		++*stats().map_mutations;
+		++* stats().map_mutations;
 		typeTable = typeTable->set( id, Scoped<NamedTypeDecl>{ decl, scope } );
 	}
 
-	bool addedDeclConflicts( AggregateDecl *existing, AggregateDecl *added ) {
+	bool addedDeclConflicts( AggregateDecl * existing, AggregateDecl * added ) {
 		if ( ! existing->body ) {
 			return false;
@@ -563,89 +568,89 @@
 	}
 
-	void Indexer::addStruct( const std::string &id ) {
+	void Indexer::addStruct( const std::string & id ) {
 		addStruct( new StructDecl( id ) );
 	}
 
-	void Indexer::addStruct( StructDecl *decl ) {
-		++*stats().add_calls;
-		const std::string &id = decl->name;
+	void Indexer::addStruct( StructDecl * decl ) {
+		++* stats().add_calls;
+		const std::string & id = decl->name;
 
 		if ( ! structTable ) {
 			structTable = StructTable::new_ptr();
 		} else {
-			++*stats().map_lookups;
+			++* stats().map_lookups;
 			auto existing = structTable->find( id );
-			if ( existing != structTable->end()  
-				&& existing->second.scope == scope 
+			if ( existing != structTable->end()
+				&& existing->second.scope == scope
 				&& addedDeclConflicts( existing->second.decl, decl ) ) return;
 		}
 
 		lazyInitScope();
-		++*stats().map_mutations;
+		++* stats().map_mutations;
 		structTable = structTable->set( id, Scoped<StructDecl>{ decl, scope } );
 	}
 
-	void Indexer::addEnum( EnumDecl *decl ) {
-		++*stats().add_calls;
-		const std::string &id = decl->name;
+	void Indexer::addEnum( EnumDecl * decl ) {
+		++* stats().add_calls;
+		const std::string & id = decl->name;
 
 		if ( ! enumTable ) {
 			enumTable = EnumTable::new_ptr();
 		} else {
-			++*stats().map_lookups;
+			++* stats().map_lookups;
 			auto existing = enumTable->find( id );
-			if ( existing != enumTable->end()  
-				&& existing->second.scope == scope 
+			if ( existing != enumTable->end()
+				&& existing->second.scope == scope
 				&& addedDeclConflicts( existing->second.decl, decl ) ) return;
 		}
-		
+
 		lazyInitScope();
-		++*stats().map_mutations;
+		++* stats().map_mutations;
 		enumTable = enumTable->set( id, Scoped<EnumDecl>{ decl, scope } );
 	}
 
-	void Indexer::addUnion( const std::string &id ) {
+	void Indexer::addUnion( const std::string & id ) {
 		addUnion( new UnionDecl( id ) );
 	}
 
-	void Indexer::addUnion( UnionDecl *decl ) {
-		++*stats().add_calls;
-		const std::string &id = decl->name;
+	void Indexer::addUnion( UnionDecl * decl ) {
+		++* stats().add_calls;
+		const std::string & id = decl->name;
 
 		if ( ! unionTable ) {
 			unionTable = UnionTable::new_ptr();
 		} else {
-			++*stats().map_lookups;
+			++* stats().map_lookups;
 			auto existing = unionTable->find( id );
-			if ( existing != unionTable->end() 
-				&& existing->second.scope == scope 
+			if ( existing != unionTable->end()
+				&& existing->second.scope == scope
 				&& addedDeclConflicts( existing->second.decl, decl ) ) return;
 		}
 
 		lazyInitScope();
-		++*stats().map_mutations;
+		++* stats().map_mutations;
 		unionTable = unionTable->set( id, Scoped<UnionDecl>{ decl, scope } );
 	}
 
-	void Indexer::addTrait( TraitDecl *decl ) {
-		++*stats().add_calls;
-		const std::string &id = decl->name;
+	void Indexer::addTrait( TraitDecl * decl ) {
+		++* stats().add_calls;
+		const std::string & id = decl->name;
 
 		if ( ! traitTable ) {
 			traitTable = TraitTable::new_ptr();
 		} else {
-			++*stats().map_lookups;
+			++* stats().map_lookups;
 			auto existing = traitTable->find( id );
-			if ( existing != traitTable->end() 
-				&& existing->second.scope == scope 
+			if ( existing != traitTable->end()
+				&& existing->second.scope == scope
 				&& addedDeclConflicts( existing->second.decl, decl ) ) return;
 		}
 
 		lazyInitScope();
-		++*stats().map_mutations;
+		++* stats().map_mutations;
 		traitTable = traitTable->set( id, Scoped<TraitDecl>{ decl, scope } );
 	}
 
-	void Indexer::addMembers( AggregateDecl * aggr, Expression * expr, 
+	void Indexer::addMembers( AggregateDecl * aggr, Expression * expr,
 			OnConflict handleConflicts ) {
 		for ( Declaration * decl : aggr->members ) {
@@ -654,5 +659,5 @@
 				if ( dwt->name == "" ) {
 					Type * t = dwt->get_type()->stripReferences();
-					if ( dynamic_cast<StructInstType*>( t ) || dynamic_cast<UnionInstType*>( t ) ) {
+					if ( dynamic_cast<StructInstType *>( t ) || dynamic_cast<UnionInstType *>( t ) ) {
 						Expression * base = expr->clone();
 						ResolvExpr::Cost cost = ResolvExpr::Cost::zero; // xxx - carry this cost into the indexer as a base cost?
Index: src/SymTab/Indexer.h
===================================================================
--- src/SymTab/Indexer.h	(revision 7870799883ca946218c97fb6a189d1da90a16e8e)
+++ src/SymTab/Indexer.h	(revision ef5b8288bd2be4816de42f8ea6a9b3d5e5971b31)
@@ -34,5 +34,5 @@
 		virtual ~Indexer();
 
-		// when using an indexer manually (e.g., within a mutator traversal), it is necessary to 
+		// when using an indexer manually (e.g., within a mutator traversal), it is necessary to
 		// tell the indexer explicitly when scopes begin and end
 		void enterScope();
@@ -50,7 +50,7 @@
 			// NOTE: shouldn't need either of these constructors, but gcc-4 does not properly support initializer lists with default members.
 			IdData() = default;
-			IdData( 
+			IdData(
 				DeclarationWithType * id, Expression * baseExpr, BaseSyntaxNode * deleteStmt,
-				unsigned long scope ) 
+				unsigned long scope )
 				: id( id ), baseExpr( baseExpr ), deleteStmt( deleteStmt ), scope( scope ) {}
 			IdData( const IdData& o, BaseSyntaxNode * deleteStmt )
@@ -61,35 +61,40 @@
 
 		/// Gets all declarations with the given ID
-		void lookupId( const std::string &id, std::list< IdData > &out ) const;
+		void lookupId( const std::string & id, std::list< IdData > &out ) const;
 		/// Gets the top-most type declaration with the given ID
-		NamedTypeDecl *lookupType( const std::string &id ) const;
+		const NamedTypeDecl * lookupType( const std::string & id ) const;
+		NamedTypeDecl * lookupMutableType( const std::string & id ) const;
 		/// Gets the top-most struct declaration with the given ID
-		StructDecl *lookupStruct( const std::string &id ) const;
+		const StructDecl * lookupStruct( const std::string & id ) const;
+		StructDecl * lookupMutableStruct( const std::string & id ) const;
 		/// Gets the top-most enum declaration with the given ID
-		EnumDecl *lookupEnum( const std::string &id ) const;
+		const EnumDecl * lookupEnum( const std::string & id ) const;
+		EnumDecl * lookupMutableEnum( const std::string & id ) const;
 		/// Gets the top-most union declaration with the given ID
-		UnionDecl *lookupUnion( const std::string &id ) const;
+		const UnionDecl * lookupUnion( const std::string & id ) const;
+		UnionDecl * lookupMutableUnion( const std::string & id ) const;
 		/// Gets the top-most trait declaration with the given ID
-		TraitDecl *lookupTrait( const std::string &id ) const;
+		const TraitDecl * lookupTrait( const std::string & id ) const;
+		TraitDecl * lookupMutableTrait( const std::string & id ) const;
 
 		/// Gets the type declaration with the given ID at global scope
-		NamedTypeDecl *globalLookupType( const std::string &id ) const;
+		const NamedTypeDecl * globalLookupType( const std::string & id ) const;
 		/// Gets the struct declaration with the given ID at global scope
-		StructDecl *globalLookupStruct( const std::string &id ) const;
+		const StructDecl * globalLookupStruct( const std::string & id ) const;
 		/// Gets the union declaration with the given ID at global scope
-		UnionDecl *globalLookupUnion( const std::string &id ) const;
+		const UnionDecl * globalLookupUnion( const std::string & id ) const;
 		/// Gets the enum declaration with the given ID at global scope
-		EnumDecl *globalLookupEnum( const std::string &id ) const;
+		const EnumDecl * globalLookupEnum( const std::string & id ) const;
 
 		void addId( DeclarationWithType * decl, Expression * baseExpr = nullptr );
 		void addDeletedId( DeclarationWithType * decl, BaseSyntaxNode * deleteStmt );
 
-		void addType( NamedTypeDecl *decl );
-		void addStruct( const std::string &id );
-		void addStruct( StructDecl *decl );
-		void addEnum( EnumDecl *decl );
-		void addUnion( const std::string &id );
-		void addUnion( UnionDecl *decl );
-		void addTrait( TraitDecl *decl );
+		void addType( NamedTypeDecl * decl );
+		void addStruct( const std::string & id );
+		void addStruct( StructDecl * decl );
+		void addEnum( EnumDecl * decl );
+		void addUnion( const std::string & id );
+		void addUnion( UnionDecl * decl );
+		void addTrait( TraitDecl * decl );
 
 		/// adds all of the IDs from WithStmt exprs
@@ -106,11 +111,11 @@
 
 	  private:
-	  	/// Wraps a Decl* with a scope
+	  	/// Wraps a Decl * with a scope
 	  	template<typename Decl>
 		struct Scoped {
-			Decl* decl;           ///< declaration
+			Decl * decl;           ///< declaration
 			unsigned long scope;  ///< scope of this declaration
 
-			Scoped(Decl* d, unsigned long s) : decl(d), scope(s) {}
+			Scoped(Decl * d, unsigned long s) : decl(d), scope(s) {}
 		};
 
@@ -140,7 +145,7 @@
 
 		/// Gets the indexer at the given scope
-		const Indexer* atScope( unsigned long scope ) const;
+		const Indexer * atScope( unsigned long scope ) const;
 
-		/// Removes matching autogenerated constructors and destructors so that they will not be 
+		/// Removes matching autogenerated constructors and destructors so that they will not be
 		/// selected. If returns false, passed decl should not be added.
 		bool removeSpecialOverrides( IdData& decl, MangleTable::Ptr& mangleTable );
@@ -166,10 +171,10 @@
 		/// true if the existing identifier conflicts with the added identifier
 		bool addedIdConflicts(
-			const IdData& existing, DeclarationWithType * added, OnConflict handleConflicts, 
+			const IdData& existing, DeclarationWithType * added, OnConflict handleConflicts,
 			BaseSyntaxNode * deleteStmt );
 
 		/// common code for addId, addDeletedId, etc.
-		void addId( 
-			DeclarationWithType * decl, OnConflict handleConflicts, 
+		void addId(
+			DeclarationWithType * decl, OnConflict handleConflicts,
 			Expression * baseExpr = nullptr, BaseSyntaxNode * deleteStmt = nullptr );
 
@@ -178,7 +183,7 @@
 
 		/// returns true if there exists a declaration with C linkage and the given name with the same mangled name
-		bool hasCompatibleCDecl( const std::string &id, const std::string &mangleName ) const;
+		bool hasCompatibleCDecl( const std::string & id, const std::string &mangleName ) const;
 		/// returns true if there exists a declaration with C linkage and the given name with a different mangled name
-		bool hasIncompatibleCDecl( const std::string &id, const std::string &mangleName ) const;
+		bool hasIncompatibleCDecl( const std::string & id, const std::string &mangleName ) const;
 	};
 } // namespace SymTab
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 7870799883ca946218c97fb6a189d1da90a16e8e)
+++ src/SymTab/Validate.cc	(revision ef5b8288bd2be4816de42f8ea6a9b3d5e5971b31)
@@ -119,5 +119,5 @@
 
 	  private:
-		template< typename AggDecl > void handleAggregate( AggDecl *aggregateDecl );
+		template< typename AggDecl > void handleAggregate( AggDecl * aggregateDecl );
 
 		AggregateDecl * parentAggr = nullptr;
@@ -134,32 +134,32 @@
 	/// Replaces enum types by int, and function or array types in function parameter and return lists by appropriate pointers.
 	struct EnumAndPointerDecay_old {
-		void previsit( EnumDecl *aggregateDecl );
-		void previsit( FunctionType *func );
+		void previsit( EnumDecl * aggregateDecl );
+		void previsit( FunctionType * func );
 	};
 
 	/// Associates forward declarations of aggregates with their definitions
 	struct LinkReferenceToTypes_old final : public WithIndexer, public WithGuards, public WithVisitorRef<LinkReferenceToTypes_old>, public WithShortCircuiting {
-		LinkReferenceToTypes_old( const Indexer *indexer );
-		void postvisit( TypeInstType *typeInst );
-
-		void postvisit( EnumInstType *enumInst );
-		void postvisit( StructInstType *structInst );
-		void postvisit( UnionInstType *unionInst );
-		void postvisit( TraitInstType *traitInst );
+		LinkReferenceToTypes_old( const Indexer * indexer );
+		void postvisit( TypeInstType * typeInst );
+
+		void postvisit( EnumInstType * enumInst );
+		void postvisit( StructInstType * structInst );
+		void postvisit( UnionInstType * unionInst );
+		void postvisit( TraitInstType * traitInst );
 		void previsit( QualifiedType * qualType );
 		void postvisit( QualifiedType * qualType );
 
-		void postvisit( EnumDecl *enumDecl );
-		void postvisit( StructDecl *structDecl );
-		void postvisit( UnionDecl *unionDecl );
+		void postvisit( EnumDecl * enumDecl );
+		void postvisit( StructDecl * structDecl );
+		void postvisit( UnionDecl * unionDecl );
 		void postvisit( TraitDecl * traitDecl );
 
-		void previsit( StructDecl *structDecl );
-		void previsit( UnionDecl *unionDecl );
+		void previsit( StructDecl * structDecl );
+		void previsit( UnionDecl * unionDecl );
 
 		void renameGenericParams( std::list< TypeDecl * > & params );
 
 	  private:
-		const Indexer *local_indexer;
+		const Indexer * local_indexer;
 
 		typedef std::map< std::string, std::list< EnumInstType * > > ForwardEnumsType;
@@ -239,5 +239,5 @@
 
 		template<typename AggDecl>
-		void handleAggregate( AggDecl *aggregateDecl );
+		void handleAggregate( AggDecl * aggregateDecl );
 
 		void previsit( StructDecl * aggregateDecl );
@@ -252,5 +252,5 @@
 		static void verify( std::list< Declaration * > &translationUnit );
 
-		void previsit( FunctionDecl *funcDecl );
+		void previsit( FunctionDecl * funcDecl );
 	};
 
@@ -287,6 +287,6 @@
 		Type::StorageClasses storageClasses;
 
-		void premutate( ObjectDecl *objectDecl );
-		Expression * postmutate( CompoundLiteralExpr *compLitExpr );
+		void premutate( ObjectDecl * objectDecl );
+		Expression * postmutate( CompoundLiteralExpr * compLitExpr );
 	};
 
@@ -393,5 +393,5 @@
 	}
 
-	void validateType( Type *type, const Indexer *indexer ) {
+	void validateType( Type * type, const Indexer * indexer ) {
 		PassVisitor<EnumAndPointerDecay_old> epc;
 		PassVisitor<LinkReferenceToTypes_old> lrt( indexer );
@@ -496,5 +496,5 @@
 	}
 
-	bool shouldHoist( Declaration *decl ) {
+	bool shouldHoist( Declaration * decl ) {
 		return dynamic_cast< StructDecl * >( decl ) || dynamic_cast< UnionDecl * >( decl ) || dynamic_cast< StaticAssertDecl * >( decl );
 	}
@@ -515,5 +515,5 @@
 
 	template< typename AggDecl >
-	void HoistStruct::handleAggregate( AggDecl *aggregateDecl ) {
+	void HoistStruct::handleAggregate( AggDecl * aggregateDecl ) {
 		if ( parentAggr ) {
 			aggregateDecl->parent = parentAggr;
@@ -560,5 +560,5 @@
 
 
-	bool isTypedef( Declaration *decl ) {
+	bool isTypedef( Declaration * decl ) {
 		return dynamic_cast< TypedefDecl * >( decl );
 	}
@@ -571,5 +571,5 @@
 
 	template< typename AggDecl >
-	void EliminateTypedef::handleAggregate( AggDecl *aggregateDecl ) {
+	void EliminateTypedef::handleAggregate( AggDecl * aggregateDecl ) {
 		filter( aggregateDecl->members, isTypedef, true );
 	}
@@ -586,5 +586,5 @@
 		// remove and delete decl stmts
 		filter( compoundStmt->kids, [](Statement * stmt) {
-			if ( DeclStmt *declStmt = dynamic_cast< DeclStmt * >( stmt ) ) {
+			if ( DeclStmt * declStmt = dynamic_cast< DeclStmt * >( stmt ) ) {
 				if ( dynamic_cast< TypedefDecl * >( declStmt->decl ) ) {
 					return true;
@@ -595,8 +595,8 @@
 	}
 
-	void EnumAndPointerDecay_old::previsit( EnumDecl *enumDecl ) {
+	void EnumAndPointerDecay_old::previsit( EnumDecl * enumDecl ) {
 		// Set the type of each member of the enumeration to be EnumConstant
 		for ( std::list< Declaration * >::iterator i = enumDecl->members.begin(); i != enumDecl->members.end(); ++i ) {
-			ObjectDecl * obj = dynamic_cast< ObjectDecl * >( *i );
+			ObjectDecl * obj = dynamic_cast< ObjectDecl * >( * i );
 			assert( obj );
 			obj->set_type( new EnumInstType( Type::Qualifiers( Type::Const ), enumDecl->name ) );
@@ -627,5 +627,5 @@
 	}
 
-	void EnumAndPointerDecay_old::previsit( FunctionType *func ) {
+	void EnumAndPointerDecay_old::previsit( FunctionType * func ) {
 		// Fix up parameters and return types
 		fixFunctionList( func->parameters, func->isVarArgs, func );
@@ -633,5 +633,5 @@
 	}
 
-	LinkReferenceToTypes_old::LinkReferenceToTypes_old( const Indexer *other_indexer ) {
+	LinkReferenceToTypes_old::LinkReferenceToTypes_old( const Indexer * other_indexer ) {
 		if ( other_indexer ) {
 			local_indexer = other_indexer;
@@ -641,6 +641,6 @@
 	}
 
-	void LinkReferenceToTypes_old::postvisit( EnumInstType *enumInst ) {
-		EnumDecl *st = local_indexer->lookupEnum( enumInst->name );
+	void LinkReferenceToTypes_old::postvisit( EnumInstType * enumInst ) {
+		EnumDecl * st = local_indexer->lookupMutableEnum( enumInst->name );
 		// it's not a semantic error if the enum is not found, just an implicit forward declaration
 		if ( st ) {
@@ -661,6 +661,6 @@
 	}
 
-	void LinkReferenceToTypes_old::postvisit( StructInstType *structInst ) {
-		StructDecl *st = local_indexer->lookupStruct( structInst->name );
+	void LinkReferenceToTypes_old::postvisit( StructInstType * structInst ) {
+		StructDecl * st = local_indexer->lookupMutableStruct( structInst->name );
 		// it's not a semantic error if the struct is not found, just an implicit forward declaration
 		if ( st ) {
@@ -674,6 +674,6 @@
 	}
 
-	void LinkReferenceToTypes_old::postvisit( UnionInstType *unionInst ) {
-		UnionDecl *un = local_indexer->lookupUnion( unionInst->name );
+	void LinkReferenceToTypes_old::postvisit( UnionInstType * unionInst ) {
+		UnionDecl * un = local_indexer->lookupMutableUnion( unionInst->name );
 		// it's not a semantic error if the union is not found, just an implicit forward declaration
 		if ( un ) {
@@ -693,5 +693,5 @@
 	void LinkReferenceToTypes_old::postvisit( QualifiedType * qualType ) {
 		// linking only makes sense for the 'oldest ancestor' of the qualified type
-		qualType->parent->accept( *visitor );
+		qualType->parent->accept( * visitor );
 	}
 
@@ -762,5 +762,5 @@
 	void LinkReferenceToTypes_old::postvisit( TraitInstType * traitInst ) {
 		// handle other traits
-		TraitDecl *traitDecl = local_indexer->lookupTrait( traitInst->name );
+		TraitDecl * traitDecl = local_indexer->lookupMutableTrait( traitInst->name );
 		if ( ! traitDecl ) {
 			SemanticError( traitInst->location, "use of undeclared trait " + traitInst->name );
@@ -786,5 +786,5 @@
 	}
 
-	void LinkReferenceToTypes_old::postvisit( EnumDecl *enumDecl ) {
+	void LinkReferenceToTypes_old::postvisit( EnumDecl * enumDecl ) {
 		// visit enum members first so that the types of self-referencing members are updated properly
 		if ( enumDecl->body ) {
@@ -792,5 +792,5 @@
 			if ( fwds != forwardEnums.end() ) {
 				for ( std::list< EnumInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
-					(*inst)->baseEnum = enumDecl;
+					(* inst)->baseEnum = enumDecl;
 				} // for
 				forwardEnums.erase( fwds );
@@ -834,5 +834,5 @@
 	}
 
-	void LinkReferenceToTypes_old::postvisit( StructDecl *structDecl ) {
+	void LinkReferenceToTypes_old::postvisit( StructDecl * structDecl ) {
 		// visit struct members first so that the types of self-referencing members are updated properly
 		// xxx - need to ensure that type parameters match up between forward declarations and definition (most importantly, number of type parameters and their defaults)
@@ -841,5 +841,5 @@
 			if ( fwds != forwardStructs.end() ) {
 				for ( std::list< StructInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
-					(*inst)->baseStruct = structDecl;
+					(* inst)->baseStruct = structDecl;
 				} // for
 				forwardStructs.erase( fwds );
@@ -848,10 +848,10 @@
 	}
 
-	void LinkReferenceToTypes_old::postvisit( UnionDecl *unionDecl ) {
+	void LinkReferenceToTypes_old::postvisit( UnionDecl * unionDecl ) {
 		if ( unionDecl->body ) {
 			ForwardUnionsType::iterator fwds = forwardUnions.find( unionDecl->name );
 			if ( fwds != forwardUnions.end() ) {
 				for ( std::list< UnionInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
-					(*inst)->baseUnion = unionDecl;
+					(* inst)->baseUnion = unionDecl;
 				} // for
 				forwardUnions.erase( fwds );
@@ -860,10 +860,10 @@
 	}
 
-	void LinkReferenceToTypes_old::postvisit( TypeInstType *typeInst ) {
+	void LinkReferenceToTypes_old::postvisit( TypeInstType * typeInst ) {
 		// ensure generic parameter instances are renamed like the base type
 		if ( inGeneric && typeInst->baseType ) typeInst->name = typeInst->baseType->name;
-		if ( NamedTypeDecl *namedTypeDecl = local_indexer->lookupType( typeInst->name ) ) {
-			if ( TypeDecl *typeDecl = dynamic_cast< TypeDecl * >( namedTypeDecl ) ) {
-				typeInst->set_isFtype( typeDecl->get_kind() == TypeDecl::Ftype );
+		if ( const NamedTypeDecl * namedTypeDecl = local_indexer->lookupType( typeInst->name ) ) {
+			if ( const TypeDecl * typeDecl = dynamic_cast< const TypeDecl * >( namedTypeDecl ) ) {
+				typeInst->set_isFtype( typeDecl->kind == TypeDecl::Ftype );
 			} // if
 		} // if
@@ -877,5 +877,5 @@
 			// expand trait instances into their members
 			for ( DeclarationWithType * assertion : asserts ) {
-				if ( TraitInstType *traitInst = dynamic_cast< TraitInstType * >( assertion->get_type() ) ) {
+				if ( TraitInstType * traitInst = dynamic_cast< TraitInstType * >( assertion->get_type() ) ) {
 					// expand trait instance into all of its members
 					expandAssertions( traitInst, back_inserter( type->assertions ) );
@@ -897,5 +897,5 @@
 	}
 
-	void ForallPointerDecay_old::previsit( ObjectDecl *object ) {
+	void ForallPointerDecay_old::previsit( ObjectDecl * object ) {
 		// ensure that operator names only apply to functions or function pointers
 		if ( CodeGen::isOperator( object->name ) && ! dynamic_cast< FunctionType * >( object->type->stripDeclarator() ) ) {
@@ -905,5 +905,5 @@
 	}
 
-	void ForallPointerDecay_old::previsit( FunctionDecl *func ) {
+	void ForallPointerDecay_old::previsit( FunctionDecl * func ) {
 		func->fixUniqueId();
 	}
@@ -961,5 +961,5 @@
 	Type * ReplaceTypedef::postmutate( QualifiedType * qualType ) {
 		// replacing typedefs only makes sense for the 'oldest ancestor' of the qualified type
-		qualType->parent = qualType->parent->acceptMutator( *visitor );
+		qualType->parent = qualType->parent->acceptMutator( * visitor );
 		return qualType;
 	}
@@ -970,5 +970,5 @@
 		TypedefMap::const_iterator def = typedefNames.find( typeInst->name );
 		if ( def != typedefNames.end() ) {
-			Type *ret = def->second.first->base->clone();
+			Type * ret = def->second.first->base->clone();
 			ret->location = typeInst->location;
 			ret->get_qualifiers() |= typeInst->get_qualifiers();
@@ -982,5 +982,5 @@
 			// place instance parameters on the typedef'd type
 			if ( ! typeInst->parameters.empty() ) {
-				ReferenceToType *rtt = dynamic_cast<ReferenceToType*>(ret);
+				ReferenceToType * rtt = dynamic_cast<ReferenceToType *>(ret);
 				if ( ! rtt ) {
 					SemanticError( typeInst->location, "Cannot apply type parameters to base type of " + typeInst->name );
@@ -988,5 +988,5 @@
 				rtt->parameters.clear();
 				cloneAll( typeInst->parameters, rtt->parameters );
-				mutateAll( rtt->parameters, *visitor );  // recursively fix typedefs on parameters
+				mutateAll( rtt->parameters, * visitor );  // recursively fix typedefs on parameters
 			} // if
 			delete typeInst;
@@ -1043,14 +1043,14 @@
 		//    struct screen;
 		// because the expansion of the typedef is:
-		//    void rtn( SCREEN *p ) => void rtn( struct screen *p )
+		//    void rtn( SCREEN * p ) => void rtn( struct screen * p )
 		// hence the type-name "screen" must be defined.
 		// Note, qualifiers on the typedef are superfluous for the forward declaration.
 
-		Type *designatorType = tyDecl->base->stripDeclarator();
-		if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( designatorType ) ) {
+		Type * designatorType = tyDecl->base->stripDeclarator();
+		if ( StructInstType * aggDecl = dynamic_cast< StructInstType * >( designatorType ) ) {
 			declsToAddBefore.push_back( new StructDecl( aggDecl->name, DeclarationNode::Struct, noAttributes, tyDecl->linkage ) );
-		} else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( designatorType ) ) {
+		} else if ( UnionInstType * aggDecl = dynamic_cast< UnionInstType * >( designatorType ) ) {
 			declsToAddBefore.push_back( new UnionDecl( aggDecl->name, noAttributes, tyDecl->linkage ) );
-		} else if ( EnumInstType *enumDecl = dynamic_cast< EnumInstType * >( designatorType ) ) {
+		} else if ( EnumInstType * enumDecl = dynamic_cast< EnumInstType * >( designatorType ) ) {
 			declsToAddBefore.push_back( new EnumDecl( enumDecl->name, noAttributes, tyDecl->linkage ) );
 		} // if
@@ -1078,5 +1078,5 @@
 
 	DeclarationWithType * ReplaceTypedef::postmutate( ObjectDecl * objDecl ) {
-		if ( FunctionType *funtype = dynamic_cast<FunctionType *>( objDecl->type ) ) { // function type?
+		if ( FunctionType * funtype = dynamic_cast<FunctionType *>( objDecl->type ) ) { // function type?
 			// replace the current object declaration with a function declaration
 			FunctionDecl * newDecl = new FunctionDecl( objDecl->name, objDecl->get_storageClasses(), objDecl->linkage, funtype, 0, objDecl->attributes, objDecl->get_funcSpec() );
@@ -1104,5 +1104,5 @@
 	void ReplaceTypedef::addImplicitTypedef( AggDecl * aggDecl ) {
 		if ( typedefNames.count( aggDecl->get_name() ) == 0 ) {
-			Type *type = nullptr;
+			Type * type = nullptr;
 			if ( StructDecl * newDeclStructDecl = dynamic_cast< StructDecl * >( aggDecl ) ) {
 				type = new StructInstType( Type::Qualifiers(), newDeclStructDecl->get_name() );
@@ -1130,5 +1130,5 @@
 		GuardScope( typedefNames );
 		GuardScope( typedeclNames );
-		mutateAll( aggr->parameters, *visitor );
+		mutateAll( aggr->parameters, * visitor );
 
 		// unroll mutateAll for aggr->members so that implicit typedefs for nested types are added to the aggregate body.
@@ -1137,5 +1137,5 @@
 
 			try {
-				*i = maybeMutate( *i, *visitor );
+				* i = maybeMutate( * i, * visitor );
 			} catch ( SemanticErrorException &e ) {
 				errors.append( e );
@@ -1217,11 +1217,11 @@
 			for ( size_t i = 0; paramIter != params->end(); ++paramIter, ++i ) {
 				if ( i < args.size() ) {
-					TypeExpr * expr = strict_dynamic_cast< TypeExpr * >( *std::next( args.begin(), i ) );
-					sub.add( (*paramIter)->get_name(), expr->get_type()->clone() );
+					TypeExpr * expr = strict_dynamic_cast< TypeExpr * >( * std::next( args.begin(), i ) );
+					sub.add( (* paramIter)->get_name(), expr->get_type()->clone() );
 				} else if ( i == args.size() ) {
-					Type * defaultType = (*paramIter)->get_init();
+					Type * defaultType = (* paramIter)->get_init();
 					if ( defaultType ) {
 						args.push_back( new TypeExpr( defaultType->clone() ) );
-						sub.add( (*paramIter)->get_name(), defaultType->clone() );
+						sub.add( (* paramIter)->get_name(), defaultType->clone() );
 					}
 				}
@@ -1242,14 +1242,14 @@
 	}
 
-	void CompoundLiteral::premutate( ObjectDecl *objectDecl ) {
+	void CompoundLiteral::premutate( ObjectDecl * objectDecl ) {
 		storageClasses = objectDecl->get_storageClasses();
 	}
 
-	Expression *CompoundLiteral::postmutate( CompoundLiteralExpr *compLitExpr ) {
+	Expression * CompoundLiteral::postmutate( CompoundLiteralExpr * compLitExpr ) {
 		// transform [storage_class] ... (struct S){ 3, ... };
 		// into [storage_class] struct S temp =  { 3, ... };
 		static UniqueName indexName( "_compLit" );
 
-		ObjectDecl *tempvar = new ObjectDecl( indexName.newName(), storageClasses, LinkageSpec::C, nullptr, compLitExpr->get_result(), compLitExpr->get_initializer() );
+		ObjectDecl * tempvar = new ObjectDecl( indexName.newName(), storageClasses, LinkageSpec::C, nullptr, compLitExpr->get_result(), compLitExpr->get_initializer() );
 		compLitExpr->set_result( nullptr );
 		compLitExpr->set_initializer( nullptr );
@@ -1289,5 +1289,5 @@
 			TupleType * tupleType = strict_dynamic_cast< TupleType * >( ResolvExpr::extractResultType( ftype ) );
 			// ensure return value is not destructed by explicitly creating an empty ListInit node wherein maybeConstruct is false.
-			ObjectDecl * newRet = new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, tupleType, new ListInit( std::list<Initializer*>(), noDesignators, false ) );
+			ObjectDecl * newRet = new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, tupleType, new ListInit( std::list<Initializer *>(), noDesignators, false ) );
 			deleteAll( retVals );
 			retVals.clear();
@@ -1302,5 +1302,5 @@
 
 	void FixObjectType::previsit( ObjectDecl * objDecl ) {
-		Type *new_type = ResolvExpr::resolveTypeof( objDecl->get_type(), indexer );
+		Type * new_type = ResolvExpr::resolveTypeof( objDecl->get_type(), indexer );
 		new_type->get_qualifiers() -= Type::Lvalue; // even if typeof is lvalue, variable can never have lvalue-qualified type
 		objDecl->set_type( new_type );
@@ -1308,12 +1308,12 @@
 
 	void FixObjectType::previsit( FunctionDecl * funcDecl ) {
-		Type *new_type = ResolvExpr::resolveTypeof( funcDecl->type, indexer );
+		Type * new_type = ResolvExpr::resolveTypeof( funcDecl->type, indexer );
 		new_type->get_qualifiers() -= Type::Lvalue; // even if typeof is lvalue, variable can never have lvalue-qualified type
 		funcDecl->set_type( new_type );
 	}
 
-	void FixObjectType::previsit( TypeDecl *typeDecl ) {
+	void FixObjectType::previsit( TypeDecl * typeDecl ) {
 		if ( typeDecl->get_base() ) {
-			Type *new_type = ResolvExpr::resolveTypeof( typeDecl->get_base(), indexer );
+			Type * new_type = ResolvExpr::resolveTypeof( typeDecl->get_base(), indexer );
 			new_type->get_qualifiers() -= Type::Lvalue; // even if typeof is lvalue, variable can never have lvalue-qualified type
 			typeDecl->set_base( new_type );
@@ -1378,5 +1378,5 @@
 
 namespace {
-	/// Replaces enum types by int, and function/array types in function parameter and return 
+	/// Replaces enum types by int, and function/array types in function parameter and return
 	/// lists by appropriate pointers
 	struct EnumAndPointerDecay_new {
@@ -1385,9 +1385,9 @@
 			for ( unsigned i = 0; i < enumDecl->members.size(); ++i ) {
 				// build new version of object with EnumConstant
-				ast::ptr< ast::ObjectDecl > obj = 
+				ast::ptr< ast::ObjectDecl > obj =
 					enumDecl->members[i].strict_as< ast::ObjectDecl >();
-				obj.get_and_mutate()->type = 
+				obj.get_and_mutate()->type =
 					new ast::EnumInstType{ enumDecl->name, ast::CV::Const };
-				
+
 				// set into decl
 				ast::EnumDecl * mut = mutate( enumDecl );
@@ -1399,9 +1399,9 @@
 
 		static const ast::FunctionType * fixFunctionList(
-			const ast::FunctionType * func, 
+			const ast::FunctionType * func,
 			std::vector< ast::ptr< ast::DeclWithType > > ast::FunctionType::* field,
 			ast::ArgumentFlag isVarArgs = ast::FixedArgs
 		) {
-			const auto & dwts = func->*field;
+			const auto & dwts = func->* field;
 			unsigned nvals = dwts.size();
 			bool hasVoid = false;
@@ -1409,8 +1409,8 @@
 				func = ast::mutate_field_index( func, field, i, fixFunction( dwts[i], hasVoid ) );
 			}
-			
+
 			// the only case in which "void" is valid is where it is the only one in the list
 			if ( hasVoid && ( nvals > 1 || isVarArgs ) ) {
-				SemanticError( 
+				SemanticError(
 					dwts.front()->location, func, "invalid type void in function type" );
 			}
@@ -1418,5 +1418,5 @@
 			// one void is the only thing in the list, remove it
 			if ( hasVoid ) {
-				func = ast::mutate_field( 
+				func = ast::mutate_field(
 					func, field, std::vector< ast::ptr< ast::DeclWithType > >{} );
 			}
@@ -1432,11 +1432,11 @@
 
 	/// expand assertions from a trait instance, performing appropriate type variable substitutions
-	void expandAssertions( 
-		const ast::TraitInstType * inst, std::vector< ast::ptr< ast::DeclWithType > > & out 
+	void expandAssertions(
+		const ast::TraitInstType * inst, std::vector< ast::ptr< ast::DeclWithType > > & out
 	) {
 		assertf( inst->base, "Trait instance not linked to base trait: %s", toCString( inst ) );
 
 		// build list of trait members, substituting trait decl parameters for instance parameters
-		ast::TypeSubstitution sub{ 
+		ast::TypeSubstitution sub{
 			inst->base->params.begin(), inst->base->params.end(), inst->params.begin() };
 		// deliberately take ast::ptr by-value to ensure this does not mutate inst->base
@@ -1449,25 +1449,25 @@
 
 	/// Associates forward declarations of aggregates with their definitions
-	class LinkReferenceToTypes_new final 
-	: public ast::WithSymbolTable, public ast::WithGuards, public 
+	class LinkReferenceToTypes_new final
+	: public ast::WithSymbolTable, public ast::WithGuards, public
 	  ast::WithVisitorRef<LinkReferenceToTypes_new>, public ast::WithShortCircuiting {
-		
-		// these maps of uses of forward declarations of types need to have the actual type 
-		// declaration switched in *after* they have been traversed. To enable this in the 
-		// ast::Pass framework, any node that needs to be so mutated has mutate() called on it 
-		// before it is placed in the map, properly updating its parents in the usual traversal, 
+
+		// these maps of uses of forward declarations of types need to have the actual type
+		// declaration switched in * after * they have been traversed. To enable this in the
+		// ast::Pass framework, any node that needs to be so mutated has mutate() called on it
+		// before it is placed in the map, properly updating its parents in the usual traversal,
 		// then can have the actual mutation applied later
 		using ForwardEnumsType = std::unordered_multimap< std::string, ast::EnumInstType * >;
 		using ForwardStructsType = std::unordered_multimap< std::string, ast::StructInstType * >;
 		using ForwardUnionsType = std::unordered_multimap< std::string, ast::UnionInstType * >;
-		
+
 		const CodeLocation & location;
 		const ast::SymbolTable * localSymtab;
-		
+
 		ForwardEnumsType forwardEnums;
 		ForwardStructsType forwardStructs;
 		ForwardUnionsType forwardUnions;
 
-		/// true if currently in a generic type body, so that type parameter instances can be 
+		/// true if currently in a generic type body, so that type parameter instances can be
 		/// renamed appropriately
 		bool inGeneric = false;
@@ -1475,9 +1475,9 @@
 	public:
 		/// contstruct using running symbol table
-		LinkReferenceToTypes_new( const CodeLocation & loc ) 
+		LinkReferenceToTypes_new( const CodeLocation & loc )
 		: location( loc ), localSymtab( &symtab ) {}
-		
+
 		/// construct using provided symbol table
-		LinkReferenceToTypes_new( const CodeLocation & loc, const ast::SymbolTable & syms ) 
+		LinkReferenceToTypes_new( const CodeLocation & loc, const ast::SymbolTable & syms )
 		: location( loc ), localSymtab( &syms ) {}
 
@@ -1485,11 +1485,11 @@
 			// ensure generic parameter instances are renamed like the base type
 			if ( inGeneric && typeInst->base ) {
-				typeInst = ast::mutate_field( 
+				typeInst = ast::mutate_field(
 					typeInst, &ast::TypeInstType::name, typeInst->base->name );
 			}
 
-			if ( 
-				auto typeDecl = dynamic_cast< const ast::TypeDecl * >( 
-					localSymtab->lookupType( typeInst->name ) ) 
+			if (
+				auto typeDecl = dynamic_cast< const ast::TypeDecl * >(
+					localSymtab->lookupType( typeInst->name ) )
 			) {
 				typeInst = ast::mutate_field( typeInst, &ast::TypeInstType::kind, typeDecl->kind );
@@ -1517,5 +1517,5 @@
 			for ( const ast::Expr * param : inst->params ) {
 				if ( ! dynamic_cast< const ast::TypeExpr * >( param ) ) {
-					SemanticError( 
+					SemanticError(
 						location, inst, "Expression parameters for generic types are currently "
 						"unsupported: " );
@@ -1571,5 +1571,5 @@
 				auto expr = traitInst->params[i].as< ast::TypeExpr >();
 				if ( ! expr ) {
-					SemanticError( 
+					SemanticError(
 						traitInst->params[i].get(), "Expression parameters for trait instances "
 						"are currently unsupported: " );
@@ -1593,15 +1593,15 @@
 			return traitInst;
 		}
-		
+
 		void previsit( const ast::QualifiedType * ) { visit_children = false; }
-		
+
 		const ast::Type * postvisit( const ast::QualifiedType * qualType ) {
 			// linking only makes sense for the "oldest ancestor" of the qualified type
-			return ast::mutate_field( 
-				qualType, &ast::QualifiedType::parent, qualType->parent->accept( *visitor ) );
+			return ast::mutate_field(
+				qualType, &ast::QualifiedType::parent, qualType->parent->accept( * visitor ) );
 		}
 
 		const ast::Decl * postvisit( const ast::EnumDecl * enumDecl ) {
-			// visit enum members first so that the types of self-referencing members are updated 
+			// visit enum members first so that the types of self-referencing members are updated
 			// properly
 			if ( ! enumDecl->body ) return enumDecl;
@@ -1612,23 +1612,23 @@
 				auto inst = fwds.first;
 				do {
-					// forward decl is stored *mutably* in map, can thus be updated
+					// forward decl is stored * mutably * in map, can thus be updated
 					inst->second->base = enumDecl;
 				} while ( ++inst != fwds.second );
 				forwardEnums.erase( fwds.first, fwds.second );
 			}
-			
+
 			// ensure that enumerator initializers are properly set
 			for ( unsigned i = 0; i < enumDecl->members.size(); ++i ) {
 				auto field = enumDecl->members[i].strict_as< ast::ObjectDecl >();
 				if ( field->init ) {
-					// need to resolve enumerator initializers early so that other passes that 
+					// need to resolve enumerator initializers early so that other passes that
 					// determine if an expression is constexpr have appropriate information
 					auto init = field->init.strict_as< ast::SingleInit >();
-					
-					enumDecl = ast::mutate_field_index( 
-						enumDecl, &ast::EnumDecl::members, i, 
-						ast::mutate_field( field, &ast::ObjectDecl::init, 
+
+					enumDecl = ast::mutate_field_index(
+						enumDecl, &ast::EnumDecl::members, i,
+						ast::mutate_field( field, &ast::ObjectDecl::init,
 							ast::mutate_field( init, &ast::SingleInit::value,
-								ResolvExpr::findSingleExpression( 
+								ResolvExpr::findSingleExpression(
 									init->value, new ast::BasicType{ ast::BasicType::SignedInt },
 									symtab ) ) ) );
@@ -1639,5 +1639,5 @@
 		}
 
-		/// rename generic type parameters uniquely so that they do not conflict with user defined 
+		/// rename generic type parameters uniquely so that they do not conflict with user defined
 		/// function forall parameters, e.g. the T in Box and the T in f, below
 		///   forall(otype T)
@@ -1657,6 +1657,6 @@
 				const ast::TypeDecl * td = aggr->params[i];
 
-				aggr = ast::mutate_field_index( 
-					aggr, &AggrDecl::params, i, 
+				aggr = ast::mutate_field_index(
+					aggr, &AggrDecl::params, i,
 					ast::mutate_field( td, &ast::TypeDecl::name, "__" + td->name + "_generic_" ) );
 			}
@@ -1669,5 +1669,5 @@
 
 		void postvisit( const ast::StructDecl * structDecl ) {
-			// visit struct members first so that the types of self-referencing members are 
+			// visit struct members first so that the types of self-referencing members are
 			// updated properly
 			if ( ! structDecl->body ) return;
@@ -1678,5 +1678,5 @@
 				auto inst = fwds.first;
 				do {
-					// forward decl is stored *mutably* in map, can thus be updated
+					// forward decl is stored * mutably * in map, can thus be updated
 					inst->second->base = structDecl;
 				} while ( ++inst != fwds.second );
@@ -1690,5 +1690,5 @@
 
 		void postvisit( const ast::UnionDecl * unionDecl ) {
-			// visit union members first so that the types of self-referencing members are updated 
+			// visit union members first so that the types of self-referencing members are updated
 			// properly
 			if ( ! unionDecl->body ) return;
@@ -1699,5 +1699,5 @@
 				auto inst = fwds.first;
 				do {
-					// forward decl is stored *mutably* in map, can thus be updated
+					// forward decl is stored * mutably * in map, can thus be updated
 					inst->second->base = unionDecl;
 				} while ( ++inst != fwds.second );
@@ -1712,7 +1712,7 @@
 					"number of parameters: %zd", traitDecl->params.size() );
 
-				traitDecl = ast::mutate_field_index( 
-					traitDecl, &ast::TraitDecl::params, 0, 
-					ast::mutate_field( 
+				traitDecl = ast::mutate_field_index(
+					traitDecl, &ast::TraitDecl::params, 0,
+					ast::mutate_field(
 						traitDecl->params.front().get(), &ast::TypeDecl::sized, true ) );
 			}
@@ -1737,10 +1737,10 @@
 				traitDecl = mut;
 			}
-			
+
 			return traitDecl;
 		}
 	};
 
-	/// Replaces array and function types in forall lists by appropriate pointer type and assigns 
+	/// Replaces array and function types in forall lists by appropriate pointer type and assigns
 	/// each object and function declaration a unique ID
 	class ForallPointerDecay_new {
@@ -1751,6 +1751,6 @@
 		const ast::ObjectDecl * previsit( const ast::ObjectDecl * obj ) {
 			// ensure that operator names only apply to functions or function pointers
-			if ( 
-				CodeGen::isOperator( obj->name ) 
+			if (
+				CodeGen::isOperator( obj->name )
 				&& ! dynamic_cast< const ast::FunctionType * >( obj->type->stripDeclarator() )
 			) {
@@ -1776,10 +1776,10 @@
 		/// Fix up assertions -- flattens assertion lists, removing all trait instances
 		template< typename node_t, typename parent_t >
-		static const node_t * forallFixer( 
-			const CodeLocation & loc, const node_t * node, 
+		static const node_t * forallFixer(
+			const CodeLocation & loc, const node_t * node,
 			ast::ParameterizedType::ForallList parent_t::* forallField
 		) {
-			for ( unsigned i = 0; i < (node->*forallField).size(); ++i ) {
-				const ast::TypeDecl * type = (node->*forallField)[i];
+			for ( unsigned i = 0; i < (node->* forallField).size(); ++i ) {
+				const ast::TypeDecl * type = (node->* forallField)[i];
 				if ( type->assertions.empty() ) continue;
 
@@ -1789,6 +1789,6 @@
 				// expand trait instances into their members
 				for ( const ast::DeclWithType * assn : type->assertions ) {
-					auto traitInst = 
-						dynamic_cast< const ast::TraitInstType * >( assn->get_type() ); 
+					auto traitInst =
+						dynamic_cast< const ast::TraitInstType * >( assn->get_type() );
 					if ( traitInst ) {
 						// expand trait instance to all its members
@@ -1831,5 +1831,5 @@
 } // anonymous namespace
 
-const ast::Type * validateType( 
+const ast::Type * validateType(
 		const CodeLocation & loc, const ast::Type * type, const ast::SymbolTable & symtab ) {
 	ast::Pass< EnumAndPointerDecay_new > epc;
