Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision e73becf6ea745995e124c1c69a4c92a77a3c1a11)
+++ src/SymTab/Validate.cc	(revision 15f5c5e6f56393ba5dce4777919465f0b132b585)
@@ -80,7 +80,6 @@
 
 namespace SymTab {
-	struct LinkNestedTypes final : public WithDeclsToAdd {
-		void previsit( AggregateDecl * aggr );
-
+	/// hoists declarations that are difficult to hoist while parsing
+	struct HoistTypeDecls final : public WithDeclsToAdd {
 		void previsit( SizeofExpr * );
 		void previsit( AlignofExpr * );
@@ -269,7 +268,7 @@
 		PassVisitor<FindSpecialDeclarations> finder;
 		PassVisitor<LabelAddressFixer> labelAddrFixer;
-		PassVisitor<LinkNestedTypes> nestedTypes;
-
-		acceptAll( translationUnit, nestedTypes );
+		PassVisitor<HoistTypeDecls> hoistDecls;
+
+		acceptAll( translationUnit, hoistDecls );
 		EliminateTypedef::eliminateTypedef( translationUnit );
 		ReturnTypeFixer::fix( translationUnit ); // must happen before autogen
@@ -303,15 +302,5 @@
 
 
-	void LinkNestedTypes::previsit( AggregateDecl * aggr ) {
-		for ( auto it = aggr->members.begin(); it != aggr->members.end(); ) {
-			auto current = it++;
-			Declaration * member = *current;
-			if ( AggregateDecl * child = dynamic_cast<AggregateDecl *>( member ) ) {
-				child->parent = aggr;
-			}
-		}
-	}
-
-	void LinkNestedTypes::handleType( Type * type ) {
+	void HoistTypeDecls::handleType( Type * type ) {
 		// some type declarations are buried in expressions and not easy to hoist during parsing; hoist them here
 		AggregateDecl * aggr = nullptr;
@@ -328,13 +317,13 @@
 	}
 
-	void LinkNestedTypes::previsit( SizeofExpr * expr ) {
+	void HoistTypeDecls::previsit( SizeofExpr * expr ) {
 		handleType( expr->type );
 	}
 
-	void LinkNestedTypes::previsit( AlignofExpr * expr ) {
+	void HoistTypeDecls::previsit( AlignofExpr * expr ) {
 		handleType( expr->type );
 	}
 
-	void LinkNestedTypes::previsit( UntypedOffsetofExpr * expr ) {
+	void HoistTypeDecls::previsit( UntypedOffsetofExpr * expr ) {
 		handleType( expr->type );
 	}
