[LIB]: Don't return struct declarations in cu__find_struct_by_name
Find the real thing instead. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
4038bf3c4c
commit
30165f5c63
|
@ -524,7 +524,9 @@ struct tag *cu__find_struct_by_name(const struct cu *self, const char *name)
|
|||
continue;
|
||||
|
||||
type = tag__type(pos);
|
||||
if (type->name != NULL && strcmp(type->name, name) == 0)
|
||||
if (!type->declaration &&
|
||||
type->name != NULL &&
|
||||
strcmp(type->name, name) == 0)
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue