Skip to content

Commit 82f61ca

Browse files
authored
Merge pull request github#6577 from tamasvajk/fix/cil-modified-pointer
C#: Temporarily extract modified pointers as unmodified during CIL ex…
2 parents 1ba2623 + 0ba334b commit 82f61ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

csharp/extractor/Semmle.Extraction.CIL/Entities/PointerType.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ internal sealed class PointerType : Type
1111
public PointerType(Context cx, Type pointee) : base(cx)
1212
{
1313
this.pointee = pointee;
14+
15+
if (pointee is ModifiedType mt)
16+
{
17+
cx.Extractor.Logger.Log(
18+
Util.Logging.Severity.Info,
19+
$"Pointer to modified type {pointee.GetQualifiedName()} is changed to {mt.Unmodified.GetQualifiedName()}");
20+
this.pointee = mt.Unmodified;
21+
}
1422
}
1523

1624
public override bool Equals(object? obj)

0 commit comments

Comments
 (0)