Report a diagnostic for return types with HResult-like named structures and provide...
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Thu, 10 Aug 2023 18:14:13 +0000 (11:14 -0700)
committerGitHub <noreply@github.com>
Thu, 10 Aug 2023 18:14:13 +0000 (11:14 -0700)
commitd303781a2c6be0ed8a5047a579c4a9ab4d28fe42
treed300ba9f0e7514856eb09c3d858fbb4dfb48552a
parent2d03dc4eb65ab22ea016f49ae76d7e5e29da658d
Report a diagnostic for return types with HResult-like named structures and provide a code-fix to do the correct marshalling (#90282)
30 files changed:
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/AddMarshalAsToElementFixer.cs [new file with mode: 0644]
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/ConvertComImportToGeneratedComInterfaceFixer.cs
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGeneratorHelpers.cs
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/StructAsHResultMarshallerFactory.cs [new file with mode: 0644]
src/libraries/System.Runtime.InteropServices/gen/Common/ConvertToSourceGeneratedInteropFixer.cs
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf
src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf
src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/GeneratorDiagnosticsBag.cs
src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshalAsMarshallingGeneratorFactory.cs
src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Tests/PreserveSigTests.cs
src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/AddMarshalAsToElementTests.cs [new file with mode: 0644]
src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs
src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ConvertToGeneratedComInterfaceTests.cs
src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/ComInterfaceGenerator/GetPoint.cs
src/libraries/System.Runtime.InteropServices/tests/TestAssets/SharedTypes/ComInterfaces/IPointProvider.cs