Fixed 'typedef class Foo Foo;' edge case by iterating through linked

list.

Suggested fix by wsfulton
This commit is contained in:
David Avedissian 2017-12-31 00:23:51 +00:00
commit 3617e22fda
2 changed files with 13 additions and 0 deletions

View file

@ -3296,6 +3296,14 @@ Node *Language::classLookup(const SwigType *s) const {
break;
if (Strcmp(nodeType(n), "class") == 0)
break;
Node *sibling = n;
while (sibling) {
sibling = Getattr(sibling, "csym:nextSibling");
if (sibling && Strcmp(nodeType(sibling), "class") == 0)
break;
}
if (sibling)
break;
n = parentNode(n);
if (!n)
break;