Skip to content

Commit dcf9846

Browse files
committed
Attempted fixes
1 parent e09d766 commit dcf9846

File tree

3 files changed

+0
-44
lines changed

3 files changed

+0
-44
lines changed

src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEnumBuilder.Mono.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,6 @@ public override Type GetEnumUnderlyingType()
203203
return _underlyingType;
204204
}
205205

206-
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2110:ReflectionToDynamicallyAccessedMembers",
207-
Justification = "For instance members with MethodImplOptions.InternalCall, the linker preserves all fields of the declaring type. " +
208-
"The _tb field has DynamicallyAccessedMembersAttribute requirements, but the field access is safe because " +
209-
"Reflection.Emit is not subject to trimming.")]
210206
[MethodImplAttribute(MethodImplOptions.InternalCall)]
211207
private extern void setup_enum_type(Type t);
212208

src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,6 @@ protected override ConstructorBuilder DefineTypeInitializerCore()
638638
null);
639639
}
640640

641-
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2110:ReflectionToDynamicallyAccessedMembers",
642-
Justification = "For instance member internal calls, the linker preserves all fields of the declaring type. " +
643-
"The parent and created fields have DynamicallyAccessedMembersAttribute requirements, but creating the runtime class is safe " +
644-
"because the annotations fully preserve the parent type, and the type created via Reflection.Emit is not subject to trimming.")]
645641
[return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]
646642
[MethodImplAttribute(MethodImplOptions.InternalCall)]
647643
private extern TypeInfo create_runtime_class();

src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/Interop/InternalCalls/InternalCallsTests.cs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,6 @@ public sealed class InternalCallsTests : LinkerTestBase
1010
{
1111
protected override string TestSuiteName => "Interop/InternalCalls";
1212

13-
[Fact]
14-
public Task UnusedDefaultConstructorIsRemoved ()
15-
{
16-
return RunTest ();
17-
}
18-
19-
[Fact]
20-
public Task UnusedFieldsOfTypesAreNotRemoved ()
21-
{
22-
return RunTest ();
23-
}
24-
25-
[Fact]
26-
public Task UnusedFieldsOfTypesWhenHasThisAreNotRemoved ()
27-
{
28-
return RunTest ();
29-
}
30-
31-
[Fact]
32-
public Task DefaultConstructorOfReturnTypeIsNotRemoved ()
33-
{
34-
return RunTest ();
35-
}
36-
37-
[Fact]
38-
public Task UnusedDefaultConstructorOfTypePassedByRefIsNotRemoved ()
39-
{
40-
return RunTest ();
41-
}
42-
43-
[Fact]
44-
public Task UnusedFieldsOfTypesPassedByRefAreNotRemoved ()
45-
{
46-
return RunTest ();
47-
}
48-
4913
[Fact]
5014
public Task NoSpecialMarking ()
5115
{

0 commit comments

Comments
 (0)