diff options
author | Sven Boemer <sbomer@gmail.com> | 2022-02-15 19:33:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-15 19:33:54 +0300 |
commit | bd2cc03c2bb8457727ee487a9152790c04837d8c (patch) | |
tree | 6a9f5af9ea431e462f8e3aa7c9e7b790e62f1b5e /test | |
parent | dece0cdfc9d5f37dd0ade3b5820ef031b4cafa63 (diff) |
[DAM analyzer] Track null values in analyzer (#2604)
This tracks null values and adjusts the handling of null values in a
few intrinsics which either take structs that can never be null, or
don't return when the input is null.
MethodBodyScanner needed a small adjustment to correctly deal with the
case where an intrinsic returns TopValue.
Diffstat (limited to 'test')
3 files changed, 0 insertions, 6 deletions
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/AssemblyQualifiedNameDataflow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/AssemblyQualifiedNameDataflow.cs index b03fe04b0..0a9cf094a 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/AssemblyQualifiedNameDataflow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/AssemblyQualifiedNameDataflow.cs @@ -63,8 +63,6 @@ namespace Mono.Linker.Tests.Cases.DataFlow RequirePublicConstructors ("System.Invalid.TypeName"); } - // https://github.com/dotnet/linker/issues/2528 - [ExpectedWarning ("IL2072", nameof (RequirePublicConstructors), ProducedBy = ProducedBy.Analyzer)] static void TestNull () { Type type = null; diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/TypeHandleDataFlow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/TypeHandleDataFlow.cs index e00bfd202..507f532e5 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/TypeHandleDataFlow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/TypeHandleDataFlow.cs @@ -64,8 +64,6 @@ namespace Mono.Linker.Tests.Cases.DataFlow Type.GetTypeFromHandle (typeWithMethods.TypeHandle).RequiresPublicMethods (); } - // https://github.com/dotnet/linker/issues/2528 - [ExpectedWarning ("IL2072", nameof (Type.GetTypeFromHandle), nameof (DataFlowTypeExtensions.RequiresPublicMethods), ProducedBy = ProducedBy.Analyzer)] static void TestNull () { Type type = null; diff --git a/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs index 02e47c545..0744577ec 100644 --- a/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs +++ b/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs @@ -33,8 +33,6 @@ namespace Mono.Linker.Tests.Cases.Reflection } [Kept] - // https://github.com/dotnet/linker/issues/2528 - [ExpectedWarning ("IL2059", nameof (RuntimeHelpers) + "." + nameof (RuntimeHelpers.RunClassConstructor), ProducedBy = ProducedBy.Analyzer)] static void TestNull () { Type type = null; |