-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating to a version of Roslyn that contains the NumericIntPtr featu…
…re (#69627) * Update MicrosoftNetCompilersToolsetVersion to 4.3.0-2.22270.2 * Updating IntPtr/UIntPtr and a handful of tests to handle the numeric-intptr feature * Ensure IntPtr.TestExplicitCast and UIntPtr.TestExplicitCast correctly check the overflow exception * Update the Microsoft.Dotnet.Compatibility analyzer to 2.0.0-preview.4.22252.4 * Updating the CompatibilitySuppressions for the NumericIntPtr feature * Handle a difference in how the OverflowException is thrown for a reflected call on Mono * Use Assert.ThrowsAny as that includes derived types for xUnit
- Loading branch information
1 parent
e4ac5cd
commit 7626c5d
Showing
33 changed files
with
1,772 additions
and
653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
T:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute | ||
T:System.Diagnostics.DebuggerGuidedStepThroughAttribute | ||
T:System.Runtime.CompilerServices.EagerStaticClassConstructionAttribute | ||
T:System.Runtime.CompilerServices.NativeIntegerAttribute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Extensions.Caching.Memory.PostEvictionDelegate.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Extensions.Caching.Abstractions.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Extensions.Caching.Abstractions.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
9 changes: 9 additions & 0 deletions
9
...s/Microsoft.Extensions.DependencyInjection.Abstractions/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Extensions.DependencyInjection.ObjectFactory.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
9 changes: 9 additions & 0 deletions
9
...soft.Extensions.DependencyInjection.Specification.Tests/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Extensions.DependencyInjection.Specification.DependencyInjectionSpecificationTests.CreateInstanceFunc.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Extensions.DependencyInjection.Specification.Tests.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Extensions.DependencyInjection.Specification.Tests.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
57 changes: 57 additions & 0 deletions
57
src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.PowerModeChangedEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.SessionEndedEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.SessionEndingEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.SessionSwitchEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.SystemEvents.KillTimer(System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.TimerElapsedEventArgs.#ctor(System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.TimerElapsedEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.UserPreferenceChangedEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Microsoft.Win32.UserPreferenceChangingEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/Microsoft.Win32.SystemEvents.dll</Left> | ||
<Right>lib/net7.0/Microsoft.Win32.SystemEvents.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
15 changes: 15 additions & 0 deletions
15
src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.CodeDom.Compiler.Executor.ExecWaitWithCapture(System.IntPtr,System.String,System.CodeDom.Compiler.TempFileCollection,System.String@,System.String@)</Target> | ||
<Left>lib/net6.0/System.CodeDom.dll</Left> | ||
<Right>lib/net7.0/System.CodeDom.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.CodeDom.Compiler.Executor.ExecWaitWithCapture(System.IntPtr,System.String,System.String,System.CodeDom.Compiler.TempFileCollection,System.String@,System.String@)</Target> | ||
<Left>lib/net6.0/System.CodeDom.dll</Left> | ||
<Right>lib/net7.0/System.CodeDom.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
9 changes: 9 additions & 0 deletions
9
src/libraries/System.Composition.Hosting/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Composition.Hosting.Core.CompositeActivator.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Composition.Hosting.dll</Left> | ||
<Right>lib/net7.0/System.Composition.Hosting.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Data.OleDb.OleDbInfoMessageEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Data.OleDb.dll</Left> | ||
<Right>lib/net7.0/System.Data.OleDb.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Data.OleDb.OleDbRowUpdatedEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Data.OleDb.dll</Left> | ||
<Right>lib/net7.0/System.Data.OleDb.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Data.OleDb.OleDbRowUpdatingEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Data.OleDb.dll</Left> | ||
<Right>lib/net7.0/System.Data.OleDb.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
27 changes: 27 additions & 0 deletions
27
src/libraries/System.Diagnostics.DiagnosticSource/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Diagnostics.SampleActivity`1.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Diagnostics.DiagnosticSource.dll</Left> | ||
<Right>lib/net7.0/System.Diagnostics.DiagnosticSource.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Diagnostics.DistributedContextPropagator.PropagatorGetterCallback.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Diagnostics.DiagnosticSource.dll</Left> | ||
<Right>lib/net7.0/System.Diagnostics.DiagnosticSource.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Diagnostics.DistributedContextPropagator.PropagatorSetterCallback.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Diagnostics.DiagnosticSource.dll</Left> | ||
<Right>lib/net7.0/System.Diagnostics.DiagnosticSource.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Diagnostics.Metrics.MeasurementCallback`1.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Diagnostics.DiagnosticSource.dll</Left> | ||
<Right>lib/net7.0/System.Diagnostics.DiagnosticSource.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
9 changes: 9 additions & 0 deletions
9
src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Diagnostics.EntryWrittenEventHandler.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.Diagnostics.EventLog.dll</Left> | ||
<Right>lib/net7.0/System.Diagnostics.EventLog.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
15 changes: 15 additions & 0 deletions
15
src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.Diagnostics.ICollectData.CollectData(System.Int32,System.IntPtr,System.IntPtr,System.Int32,System.IntPtr@)</Target> | ||
<Left>lib/net6.0/System.Diagnostics.PerformanceCounter.dll</Left> | ||
<Right>lib/net7.0/System.Diagnostics.PerformanceCounter.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0006</DiagnosticId> | ||
<Target>M:System.Diagnostics.ICollectData.CollectData(System.Int32,System.IntPtr,System.IntPtr,System.Int32,System.IntPtr@)</Target> | ||
<Left>lib/net6.0/System.Diagnostics.PerformanceCounter.dll</Left> | ||
<Right>lib/net7.0/System.Diagnostics.PerformanceCounter.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
33 changes: 33 additions & 0 deletions
33
src/libraries/System.DirectoryServices.Protocols/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.DirectoryServices.Protocols.DereferenceConnectionCallback.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.DirectoryServices.Protocols.dll</Left> | ||
<Right>lib/net7.0/System.DirectoryServices.Protocols.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.DirectoryServices.Protocols.NotifyOfNewConnectionCallback.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.DirectoryServices.Protocols.dll</Left> | ||
<Right>lib/net7.0/System.DirectoryServices.Protocols.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.DirectoryServices.Protocols.QueryClientCertificateCallback.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.DirectoryServices.Protocols.dll</Left> | ||
<Right>lib/net7.0/System.DirectoryServices.Protocols.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.DirectoryServices.Protocols.QueryForConnectionCallback.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.DirectoryServices.Protocols.dll</Left> | ||
<Right>lib/net7.0/System.DirectoryServices.Protocols.dll</Right> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.DirectoryServices.Protocols.VerifyServerCertificateCallback.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.DirectoryServices.Protocols.dll</Left> | ||
<Right>lib/net7.0/System.DirectoryServices.Protocols.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
9 changes: 9 additions & 0 deletions
9
src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:System.DirectoryServices.ActiveDirectory.SyncUpdateCallback.#ctor(System.Object,System.IntPtr)</Target> | ||
<Left>lib/net6.0/System.DirectoryServices.dll</Left> | ||
<Right>lib/net7.0/System.DirectoryServices.dll</Right> | ||
</Suppression> | ||
</Suppressions> |
Oops, something went wrong.