Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision afcb0a3f35bcecbe54f6ba1e1d0b866ce121fbb6)
+++ src/SymTab/Validate.cc	(revision 69918ceafe1d4bbe9af9eaea89bea8729f968b22)
@@ -214,4 +214,16 @@
 	};
 
+	struct EliminateTypedef {
+		/// removes TypedefDecls from the AST
+		static void eliminateTypedef( std::list< Declaration * > &translationUnit );
+
+		template<typename AggDecl>
+		void handleAggregate( AggDecl *aggregateDecl );
+
+		void previsit( StructDecl * aggregateDecl );
+		void previsit( UnionDecl * aggregateDecl );
+		void previsit( CompoundStmt * compoundStmt );
+	};
+
 	struct VerifyCtorDtorAssign {
 		/// ensure that constructors, destructors, and assignment have at least one
@@ -277,4 +289,5 @@
 		acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
 		HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order
+		EliminateTypedef::eliminateTypedef( translationUnit ); //
 		acceptAll( translationUnit, genericParams );  // check as early as possible - can't happen before LinkReferenceToTypes
 		VerifyCtorDtorAssign::verify( translationUnit );  // must happen before autogen, because autogen examines existing ctor/dtors
@@ -399,4 +412,39 @@
 	}
 
+
+	bool isTypedef( Declaration *decl ) {
+		return dynamic_cast< TypedefDecl * >( decl );
+	}
+
+	void EliminateTypedef::eliminateTypedef( std::list< Declaration * > &translationUnit ) {
+		PassVisitor<EliminateTypedef> eliminator;
+		acceptAll( translationUnit, eliminator );
+		filter( translationUnit, isTypedef, true );
+	}
+
+	template< typename AggDecl >
+	void EliminateTypedef::handleAggregate( AggDecl *aggregateDecl ) {
+		filter( aggregateDecl->members, isTypedef, true );
+	}
+
+	void EliminateTypedef::previsit( StructDecl * aggregateDecl ) {
+		handleAggregate( aggregateDecl );
+	}
+
+	void EliminateTypedef::previsit( UnionDecl * aggregateDecl ) {
+		handleAggregate( aggregateDecl );
+	}
+
+	void EliminateTypedef::previsit( CompoundStmt * compoundStmt ) {
+		// remove and delete decl stmts
+		filter( compoundStmt->kids, [](Statement * stmt) {
+			if ( DeclStmt *declStmt = dynamic_cast< DeclStmt * >( stmt ) ) {
+				if ( dynamic_cast< TypedefDecl * >( declStmt->decl ) ) {
+					return true;
+				} // if
+			} // if
+			return false;
+		}, true);
+	}
 
 	void EnumAndPointerDecay::previsit( EnumDecl *enumDecl ) {
