Skip to content

Commit 43759a9

Browse files
committed
Add Parameter Types to InheritDoc comments
1 parent c245e16 commit 43759a9

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

sources/ClangSharp.PInvokeGenerator/Abstractions/FunctionOrDelegateDesc.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ internal struct FunctionOrDelegateDesc
2121
public bool HasBody { get; set; }
2222
public bool IsInherited { get; set; }
2323
public bool NeedsUnscopedRef { get; set; }
24+
public string[] ParameterTypes { get; set; }
2425

2526
public bool IsVirtual
2627
{

sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.VisitDecl.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ public void BeginFunctionOrDelegate(in FunctionOrDelegateDesc desc, ref bool isM
372372
Write(desc.ParentName);
373373
Write('.');
374374
Write(desc.EscapedName);
375+
Write('(');
376+
Write(string.Join(", ", desc.ParameterTypes));
377+
Write(')');
375378
WriteLine("\" />");
376379
}
377380
else

sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.VisitDecl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ private void VisitFunctionDecl(FunctionDecl functionDecl)
622622
}
623623
},
624624
CustomAttrGeneratorData = (functionDecl, _outputBuilder, this),
625+
ParameterTypes = functionDecl.Parameters.Select(param => GetTargetTypeName(param, out var _)).ToArray(),
625626
};
626627
Debug.Assert(_outputBuilder is not null);
627628

0 commit comments

Comments
 (0)