Skip to content

Commit 67b3058

Browse files
committed
Fix a possible overflown stack when ignoring
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 07b9e4c commit 67b3058

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/Generator/Passes/CheckIgnoredDecls.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,11 @@ public override bool VisitClassTemplateSpecializationDecl(ClassTemplateSpecializ
6161

6262
Declaration decl = null;
6363
if (specialization.Arguments.Any(a =>
64-
a.Type.Type?.TryGetDeclaration(out decl) == true))
64+
a.Type.Type?.TryGetDeclaration(out decl) == true) &&
65+
decl.Ignore)
6566
{
66-
decl.Visit(this);
67-
if (decl.Ignore)
68-
{
69-
specialization.ExplicitlyIgnore();
70-
return false;
71-
}
67+
specialization.ExplicitlyIgnore();
68+
return false;
7269
}
7370

7471
return true;
@@ -523,10 +520,6 @@ private bool IsDeclIgnored(Declaration decl)
523520
return typeMap.IsIgnored;
524521
}
525522

526-
if (decl.Ignore)
527-
return true;
528-
529-
decl.Visit(this);
530523
return decl.Ignore;
531524
}
532525

0 commit comments

Comments
 (0)