emit: Make find_fwd_decl a bit more robust

We need to dig deeper in some emit cases, but for now lets make this
a bit more robust by checking if the types are unnamed.

Things like:

struct b {
	struct {
		int a;
	};
}

This is well handled in the main fprintf routines, but its interaction
with the emit routines need more work, lets at least remove the segfault
and leave fixing this for good for v1.14.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 file changed