diff --git a/src/coreclr/src/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreRT.cs b/src/coreclr/src/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreRT.cs index 5f86e035d93d2..ad709265f5d44 100644 --- a/src/coreclr/src/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreRT.cs +++ b/src/coreclr/src/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreRT.cs @@ -284,6 +284,10 @@ public static void PrepareDelegate(Delegate d) throw new ArgumentNullException(nameof(d)); } + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2059:UnrecognizedReflectionPattern", + Justification = "We keep class constructors of all types with an EEType")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2072:UnrecognizedReflectionPattern", + Justification = "Constructed EEType of a Nullable forces a constructed EEType of the element type")] public static object GetUninitializedObject( // This API doesn't call any constructors, but the type needs to be seen as constructed. // A type is seen as constructed if a constructor is kept. diff --git a/src/libraries/illink-sharedframework.targets b/src/libraries/illink-sharedframework.targets index d26248786340d..5b1df7c13de16 100644 --- a/src/libraries/illink-sharedframework.targets +++ b/src/libraries/illink-sharedframework.targets @@ -27,8 +27,6 @@ --> $(LinkerNoWarn);IL2008 $(LinkerNoWarn);IL2012 - - $(LinkerNoWarn);IL2059;IL2072;IL2075;IL2080 $(ILLinkArgs) --nowarn $(LinkerNoWarn)