Skip to content

Commit 98fcc16

Browse files
committed
move overloadCount out of constructor only if
1 parent b44596a commit 98fcc16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.VisitDecl.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,10 @@ private void VisitFunctionDecl(FunctionDecl functionDecl)
508508
var parent = cxxMethodDecl.Parent;
509509
Debug.Assert(parent is not null);
510510
name = GetRemappedCursorName(parent);
511+
}
511512

513+
if (cxxMethodDecl is not null)
514+
{
512515
overloadCount = GetOverloadCount(cxxMethodDecl);
513516
}
514517

0 commit comments

Comments
 (0)