Merge branch 'davedissian-redundant-typedef-fix'

* davedissian-redundant-typedef-fix:
  Add more runtime typedef_classforward_same_name runtime testing
  Fixed 'typedef class Foo Foo;' edge case by iterating through linked list.
  Added test case for a forward declaration in a typedef with the same name
This commit is contained in:
William S Fulton 2018-01-06 15:27:52 +00:00
commit 6607acdf3a
6 changed files with 67 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;