[cfe-commits] [PATCH] Add nested structs to the output of -ast-print-xml

Douglas Gregor dgregor at apple.com
Wed Sep 29 08:56:05 PDT 2010


On Sep 23, 2010, at 3:18 AM, Martin Vejnár wrote:

> Hi, the attached patch adds nested structures to the XML output. Only
> defined nested structures are added.

Why? It seems like addSubNodes() for a RecordDecl should just visit all of the nodes in the decls_begin()/decls_end(), printing everything (which will include fields, member functions, static data members, etc.). Of course, it could skip "implicit" declarations, so we don't have to see the injected-class-name.

With the restriction that only defined nested structures are added, we won't see forward-declared structures like

	struct X {
		struct Inner;
	};

	- Doug



More information about the cfe-commits mailing list