Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision ee574a219a52c0b47523b1a790d363cc61f813d3)
+++ 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;
