diff --git a/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs b/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs index 34ea9b7a..98a49092 100644 --- a/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs +++ b/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs @@ -2719,103 +2719,102 @@ private string GetRemappedTypeName(Cursor? cursor, Cursor? context, Type type, o var nameToCheck = nativeTypeName; var remappedName = GetRemappedName(nameToCheck, cursor, tryRemapOperatorName: false, out var wasRemapped, skipUsing, skipUsingIfNotRemapped: true); - if (wasRemapped) - { - return remappedName; - } - - nameToCheck = nameToCheck.Replace("::", "."); - remappedName = GetRemappedName(nameToCheck, cursor, tryRemapOperatorName: false, out wasRemapped, skipUsing, skipUsingIfNotRemapped: true); - - if (wasRemapped) - { - return remappedName; - } - - nameToCheck = name; - remappedName = GetRemappedName(nameToCheck, cursor, tryRemapOperatorName: false, out wasRemapped, skipUsing); - if (!wasRemapped) { - if (IsTypeConstantOrIncompleteArray(cursor, type, out var arrayType) && IsType(cursor, arrayType.ElementType)) - { - type = arrayType.ElementType; - } + nameToCheck = nameToCheck.Replace("::", "."); + remappedName = GetRemappedName(nameToCheck, cursor, tryRemapOperatorName: false, out wasRemapped, skipUsing, skipUsingIfNotRemapped: true); - if (IsType(cursor, type, out var recordType) && remappedName.StartsWith("__AnonymousRecord_")) + if (!wasRemapped) { - var recordDecl = recordType.Decl; - remappedName = "_Anonymous"; + nameToCheck = name; + remappedName = GetRemappedName(nameToCheck, cursor, tryRemapOperatorName: false, out wasRemapped, skipUsing); - if (recordDecl.Parent is RecordDecl parentRecordDecl) + if (!wasRemapped) { - var matchingField = parentRecordDecl.Fields.Where((fieldDecl) => fieldDecl.Type.CanonicalType == recordType).FirstOrDefault(); - - if (matchingField is not null) + if (IsTypeConstantOrIncompleteArray(cursor, type, out var arrayType) && IsType(cursor, arrayType.ElementType)) { - remappedName = "_"; - remappedName += GetRemappedCursorName(matchingField); + type = arrayType.ElementType; } - else - { - var index = 0; - if (parentRecordDecl.AnonymousRecords.Count > 1) - { - index = parentRecordDecl.AnonymousRecords.IndexOf(cursor) + 1; - } + if (IsType(cursor, type, out var recordType) && remappedName.StartsWith("__AnonymousRecord_")) + { + var recordDecl = recordType.Decl; + remappedName = "_Anonymous"; - while (parentRecordDecl.IsAnonymousStructOrUnion && (parentRecordDecl.IsUnion == recordType.Decl.IsUnion)) + if (recordDecl.Parent is RecordDecl parentRecordDecl) { - index += 1; + var matchingField = parentRecordDecl.Fields.Where((fieldDecl) => fieldDecl.Type.CanonicalType == recordType).FirstOrDefault(); - if (parentRecordDecl.Parent is RecordDecl parentRecordDeclParent) + if (matchingField is not null) { - if (parentRecordDeclParent.AnonymousRecords.Count > 0) + remappedName = "_"; + remappedName += GetRemappedCursorName(matchingField); + } + else + { + var index = 0; + + if (parentRecordDecl.AnonymousRecords.Count > 1) { - index += parentRecordDeclParent.AnonymousRecords.Count - 1; + index = parentRecordDecl.AnonymousRecords.IndexOf(cursor) + 1; + } + + while (parentRecordDecl.IsAnonymousStructOrUnion && (parentRecordDecl.IsUnion == recordType.Decl.IsUnion)) + { + index += 1; + + if (parentRecordDecl.Parent is RecordDecl parentRecordDeclParent) + { + if (parentRecordDeclParent.AnonymousRecords.Count > 0) + { + index += parentRecordDeclParent.AnonymousRecords.Count - 1; + } + parentRecordDecl = parentRecordDeclParent; + } + } + + if (index != 0) + { + remappedName += index.ToString(); } - parentRecordDecl = parentRecordDeclParent; } } - if (index != 0) - { - remappedName += index.ToString(); - } + remappedName += $"_e__{(recordDecl.IsUnion ? "Union" : "Struct")}"; } - } - - remappedName += $"_e__{(recordDecl.IsUnion ? "Union" : "Struct")}"; - } - else if (IsType(cursor, type, out var enumType) && remappedName.StartsWith("__AnonymousEnum_")) - { - remappedName = GetRemappedTypeName(enumType.Decl, context: null, enumType.Decl.IntegerType, out _, skipUsing); - } - else if (cursor is EnumDecl enumDecl) - { - var enumDeclName = GetRemappedCursorName(enumDecl); + else if (IsType(cursor, type, out var enumType) && remappedName.StartsWith("__AnonymousEnum_")) + { + remappedName = GetRemappedTypeName(enumType.Decl, context: null, enumType.Decl.IntegerType, out _, skipUsing); + } + else if (cursor is EnumDecl enumDecl) + { + // Even though some types have entries with names like *_FORCE_DWORD or *_FORCE_UINT + // MSVC and Clang both still treat this as "signed" values and thus we don't want + // to specially handle it as uint, as that can break ABI handling on some platforms. - if (enumDecl.Enumerators.Any((enumConstantDecl) => IsForceDwordOrForceUInt(enumDeclName, enumConstantDecl))) - { - remappedName = "uint"; + WithType(enumDecl, ref remappedName, ref nativeTypeName); + } } - - WithType(enumDecl, ref remappedName, ref nativeTypeName); } } - if (IsNativeTypeNameEquivalent(nativeTypeName, remappedName)) + if (string.IsNullOrWhiteSpace(nativeTypeName)) { - nativeTypeName = string.Empty; + // When we have an empty native type name, it means the original + // name is the same as the native type name and no adjustments + // were made. In order to ensure things are correctly preserved + // we need to ensure its propagated back here so the below comparison + // works and we don't end up comparing "empty" vs "remapped" + nativeTypeName = name; } - return remappedName; - bool IsForceDwordOrForceUInt(string enumDeclName, EnumConstantDecl enumConstantDecl) + if (IsNativeTypeNameEquivalent(nativeTypeName, remappedName)) { - var enumConstantDeclName = GetRemappedCursorName(enumConstantDecl); - return (enumConstantDeclName == $"{enumDeclName}_FORCE_DWORD") || (enumConstantDeclName == $"{enumDeclName}_FORCE_UINT"); + // Empty the native type name if its equivalent to the new name + nativeTypeName = string.Empty; } + + return remappedName; } private static string GetSourceRangeContents(CXTranslationUnit translationUnit, CXSourceRange sourceRange) @@ -2904,13 +2903,38 @@ private string GetTargetTypeName(Cursor cursor, out string nativeTypeName) } private string GetTypeName(Cursor? cursor, Cursor? context, Type type, bool ignoreTransparentStructsWhereRequired, out string nativeTypeName) - => GetTypeName(cursor, context, type, type, ignoreTransparentStructsWhereRequired, out nativeTypeName); + { + if (_typeNames.TryGetValue((cursor, context, type), out var result)) + { + nativeTypeName = result.nativeTypeName; + return result.typeName; + } + else if (IsType(cursor, type, out var tagType) && tagType.Decl.Handle.IsAnonymous) + { + // In order to avoid minor path differences, casing, and other deltas across different + // invocations of the tool, we want to use the "built" anonymous name so we get a more + // minimal but still accurate set of information embedded in the output. + + result.typeName = GetAnonymousName(tagType.Decl, tagType.KindSpelling); + result.nativeTypeName = result.typeName; + + _typeNames[(cursor, context, type)] = result; + + nativeTypeName = result.nativeTypeName; + return result.typeName; + } + else + { + return GetTypeName(cursor, context, type, type, ignoreTransparentStructsWhereRequired, out nativeTypeName); + } + } private string GetTypeName(Cursor? cursor, Cursor? context, Type rootType, Type type, bool ignoreTransparentStructsWhereRequired, out string nativeTypeName) { if (!_typeNames.TryGetValue((cursor, context, type), out var result)) { result.typeName = type.AsString.NormalizePath() + .Replace("unnamed enum at", "anonymous enum at") .Replace("unnamed struct at", "anonymous struct at") .Replace("unnamed union at", "anonymous union at"); @@ -3113,7 +3137,12 @@ private string GetTypeName(Cursor? cursor, Cursor? context, Type rootType, Type { if (tagType.Decl.Handle.IsAnonymous) { + // In order to avoid minor path differences, casing, and other deltas across different + // invocations of the tool, we want to use the "built" anonymous name so we get a more + // minimal but still accurate set of information embedded in the output. + result.typeName = GetAnonymousName(tagType.Decl, tagType.KindSpelling); + result.nativeTypeName = result.typeName; } else if (tagType.Handle.IsConstQualified) { diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationBodyImportTest.cs index 609ec4d4..176dfade 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationBodyImportTest.cs @@ -1447,7 +1447,7 @@ namespace ClangSharp.Test public partial struct MyUnion { [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous struct at ClangUnsavedFile.h:3:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L3_C5"")] public _Anonymous_e__Struct Anonymous; public ref int a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/StructDeclarationTest.cs index 602a295a..454c3037 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/StructDeclarationTest.cs @@ -914,7 +914,7 @@ public unsafe partial struct MyStruct public {expectedManagedType} y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Struct Anonymous; public ref {expectedManagedType} z @@ -1009,13 +1009,13 @@ public unsafe partial struct _Anonymous_e__Struct {{ public {expectedManagedType} z; - [NativeTypeName(""struct (anonymous struct at ClangUnsavedFile.h:14:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C9"")] public _w_e__Struct w; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:19:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L19_C9"")] public _Anonymous1_e__Struct Anonymous1; - [NativeTypeName(""MyStruct::(anonymous union at ClangUnsavedFile.h:29:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L29_C9"")] public _Anonymous2_e__Union Anonymous2; public MyUnion u; @@ -1035,7 +1035,7 @@ public partial struct _Anonymous1_e__Struct {{ public {expectedManagedType} value1; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:23:13)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1106,7 +1106,7 @@ public partial struct MyStruct public int y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Struct Anonymous; public ref int z @@ -1161,7 +1161,7 @@ public partial struct _Anonymous_e__Struct { public int z; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1498,7 +1498,7 @@ public partial struct MyStruct public double b; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Struct Anonymous; public ref double a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/UnionDeclarationTest.cs index fd48ec3e..7d6a226b 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/UnionDeclarationTest.cs @@ -811,7 +811,7 @@ public unsafe partial struct MyUnion public {expectedManagedType} b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Union Anonymous; public ref {expectedManagedType} a @@ -902,7 +902,7 @@ public partial struct MyUnion public int y; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Union Anonymous; public ref int z @@ -960,7 +960,7 @@ public partial struct _Anonymous_e__Union public int z; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] @@ -1297,7 +1297,7 @@ public partial struct MyUnion public double b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Union Anonymous; public ref double a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationBodyImportTest.cs index 1b35a972..026859c9 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationBodyImportTest.cs @@ -1447,7 +1447,7 @@ namespace ClangSharp.Test public partial struct MyUnion { [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous struct at ClangUnsavedFile.h:3:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L3_C5"")] public _Anonymous_e__Struct Anonymous; public ref int a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/StructDeclarationTest.cs index e5fdaa52..f206369e 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/StructDeclarationTest.cs @@ -918,7 +918,7 @@ public unsafe partial struct MyStruct public {expectedManagedType} y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Struct Anonymous; public ref {expectedManagedType} z @@ -1013,13 +1013,13 @@ public unsafe partial struct _Anonymous_e__Struct {{ public {expectedManagedType} z; - [NativeTypeName(""struct (anonymous struct at ClangUnsavedFile.h:14:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C9"")] public _w_e__Struct w; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:19:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L19_C9"")] public _Anonymous1_e__Struct Anonymous1; - [NativeTypeName(""MyStruct::(anonymous union at ClangUnsavedFile.h:29:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L29_C9"")] public _Anonymous2_e__Union Anonymous2; public MyUnion u; @@ -1039,7 +1039,7 @@ public partial struct _Anonymous1_e__Struct {{ public {expectedManagedType} value1; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:23:13)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1110,7 +1110,7 @@ public partial struct MyStruct public int y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Struct Anonymous; public ref int z @@ -1165,7 +1165,7 @@ public partial struct _Anonymous_e__Struct { public int z; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1502,7 +1502,7 @@ public partial struct MyStruct public double b; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Struct Anonymous; public ref double a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/UnionDeclarationTest.cs index 3a520b73..5ed70629 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/UnionDeclarationTest.cs @@ -818,7 +818,7 @@ public unsafe partial struct MyUnion public {expectedManagedType} b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Union Anonymous; public ref {expectedManagedType} a @@ -909,7 +909,7 @@ public partial struct MyUnion public int y; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Union Anonymous; public ref int z @@ -967,7 +967,7 @@ public partial struct _Anonymous_e__Union public int z; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] @@ -1304,7 +1304,7 @@ public partial struct MyUnion public double b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Union Anonymous; public ref double a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationBodyImportTest.cs index 7903b162..b0c4d581 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationBodyImportTest.cs @@ -1434,7 +1434,7 @@ namespace ClangSharp.Test public partial struct MyUnion { [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous struct at ClangUnsavedFile.h:3:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L3_C5"")] public _Anonymous_e__Struct Anonymous; public ref int a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/StructDeclarationTest.cs index d7107e8e..750e4c07 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/StructDeclarationTest.cs @@ -922,7 +922,7 @@ public unsafe partial struct MyStruct public {expectedManagedType} y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Struct Anonymous; public ref {expectedManagedType} z @@ -993,13 +993,13 @@ public unsafe partial struct _Anonymous_e__Struct {{ public {expectedManagedType} z; - [NativeTypeName(""struct (anonymous struct at ClangUnsavedFile.h:14:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C9"")] public _w_e__Struct w; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:19:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L19_C9"")] public _Anonymous1_e__Struct Anonymous1; - [NativeTypeName(""MyStruct::(anonymous union at ClangUnsavedFile.h:29:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L29_C9"")] public _Anonymous2_e__Union Anonymous2; public MyUnion u; @@ -1019,7 +1019,7 @@ public partial struct _Anonymous1_e__Struct {{ public {expectedManagedType} value1; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:23:13)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1091,7 +1091,7 @@ public partial struct MyStruct public int y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Struct Anonymous; public ref int z @@ -1140,7 +1140,7 @@ public partial struct _Anonymous_e__Struct { public int z; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1479,7 +1479,7 @@ public partial struct MyStruct public double b; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Struct Anonymous; public ref double a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/UnionDeclarationTest.cs index 24030fd9..5f67e586 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/UnionDeclarationTest.cs @@ -813,7 +813,7 @@ public unsafe partial struct MyUnion public {expectedManagedType} b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Union Anonymous; public ref {expectedManagedType} a @@ -895,7 +895,7 @@ public partial struct MyUnion public int y; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Union Anonymous; public ref int z @@ -947,7 +947,7 @@ public partial struct _Anonymous_e__Union public int z; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] @@ -1284,7 +1284,7 @@ public partial struct MyUnion public double b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Union Anonymous; public ref double a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationBodyImportTest.cs index 319e9b6c..6fcfa642 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationBodyImportTest.cs @@ -1434,7 +1434,7 @@ namespace ClangSharp.Test public partial struct MyUnion { [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous struct at ClangUnsavedFile.h:3:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L3_C5"")] public _Anonymous_e__Struct Anonymous; public ref int a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/StructDeclarationTest.cs index 7f0e8cc0..5cf8b5b4 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/StructDeclarationTest.cs @@ -926,7 +926,7 @@ public unsafe partial struct MyStruct public {expectedManagedType} y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Struct Anonymous; public ref {expectedManagedType} z @@ -997,13 +997,13 @@ public unsafe partial struct _Anonymous_e__Struct {{ public {expectedManagedType} z; - [NativeTypeName(""struct (anonymous struct at ClangUnsavedFile.h:14:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C9"")] public _w_e__Struct w; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:19:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L19_C9"")] public _Anonymous1_e__Struct Anonymous1; - [NativeTypeName(""MyStruct::(anonymous union at ClangUnsavedFile.h:29:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L29_C9"")] public _Anonymous2_e__Union Anonymous2; public MyUnion u; @@ -1023,7 +1023,7 @@ public partial struct _Anonymous1_e__Struct {{ public {expectedManagedType} value1; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:23:13)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1095,7 +1095,7 @@ public partial struct MyStruct public int y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Struct Anonymous; public ref int z @@ -1144,7 +1144,7 @@ public partial struct _Anonymous_e__Struct { public int z; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1483,7 +1483,7 @@ public partial struct MyStruct public double b; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Struct Anonymous; public ref double a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/UnionDeclarationTest.cs index dcfc0701..91e9cda4 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/UnionDeclarationTest.cs @@ -819,7 +819,7 @@ public unsafe partial struct MyUnion public {expectedManagedType} b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Union Anonymous; public ref {expectedManagedType} a @@ -901,7 +901,7 @@ public partial struct MyUnion public int y; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Union Anonymous; public ref int z @@ -953,7 +953,7 @@ public partial struct _Anonymous_e__Union public int z; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] @@ -1290,7 +1290,7 @@ public partial struct MyUnion public double b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Union Anonymous; public ref double a diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationBodyImportTest.cs index 3cc8f50e..c8599f05 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationBodyImportTest.cs @@ -1435,7 +1435,7 @@ namespace ClangSharp.Test public partial struct MyUnion { [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous struct at ClangUnsavedFile.h:3:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L3_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/StructDeclarationTest.cs index d5e3b28b..db6991e0 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/StructDeclarationTest.cs @@ -935,7 +935,7 @@ public unsafe partial struct MyStruct public {expectedManagedType} y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -1014,13 +1014,13 @@ public unsafe partial struct _Anonymous_e__Struct {{ public {expectedManagedType} z; - [NativeTypeName(""struct (anonymous struct at ClangUnsavedFile.h:14:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C9"")] public _w_e__Struct w; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:19:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L19_C9"")] public _Anonymous1_e__Struct Anonymous1; - [NativeTypeName(""MyStruct::(anonymous union at ClangUnsavedFile.h:29:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L29_C9"")] public _Anonymous2_e__Union Anonymous2; public MyUnion u; @@ -1040,7 +1040,7 @@ public partial struct _Anonymous1_e__Struct {{ public {expectedManagedType} value1; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:23:13)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1114,7 +1114,7 @@ public partial struct MyStruct public int y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -1165,7 +1165,7 @@ public partial struct _Anonymous_e__Struct { public int z; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1504,7 +1504,7 @@ public partial struct MyStruct public double b; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/UnionDeclarationTest.cs index 6e5f6497..da4dd78f 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/UnionDeclarationTest.cs @@ -826,7 +826,7 @@ public unsafe partial struct MyUnion public {expectedManagedType} b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] @@ -912,7 +912,7 @@ public partial struct MyUnion public int y; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] @@ -966,7 +966,7 @@ public partial struct _Anonymous_e__Union public int z; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] @@ -1304,7 +1304,7 @@ public partial struct MyUnion public double b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationBodyImportTest.cs index 98fefd33..9e5ba2c2 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationBodyImportTest.cs @@ -1435,7 +1435,7 @@ namespace ClangSharp.Test public partial struct MyUnion { [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous struct at ClangUnsavedFile.h:3:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L3_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/StructDeclarationTest.cs index 523e4c26..20d68f77 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/StructDeclarationTest.cs @@ -939,7 +939,7 @@ public unsafe partial struct MyStruct public {expectedManagedType} y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -1018,13 +1018,13 @@ public unsafe partial struct _Anonymous_e__Struct {{ public {expectedManagedType} z; - [NativeTypeName(""struct (anonymous struct at ClangUnsavedFile.h:14:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C9"")] public _w_e__Struct w; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:19:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L19_C9"")] public _Anonymous1_e__Struct Anonymous1; - [NativeTypeName(""MyStruct::(anonymous union at ClangUnsavedFile.h:29:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L29_C9"")] public _Anonymous2_e__Union Anonymous2; public MyUnion u; @@ -1044,7 +1044,7 @@ public partial struct _Anonymous1_e__Struct {{ public {expectedManagedType} value1; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:23:13)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1118,7 +1118,7 @@ public partial struct MyStruct public int y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -1169,7 +1169,7 @@ public partial struct _Anonymous_e__Struct { public int z; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1508,7 +1508,7 @@ public partial struct MyStruct public double b; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/UnionDeclarationTest.cs index 25013c30..9ef30142 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/UnionDeclarationTest.cs @@ -832,7 +832,7 @@ public unsafe partial struct MyUnion public {expectedManagedType} b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] @@ -918,7 +918,7 @@ public partial struct MyUnion public int y; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] @@ -972,7 +972,7 @@ public partial struct _Anonymous_e__Union public int z; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] @@ -1310,7 +1310,7 @@ public partial struct MyUnion public double b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationBodyImportTest.cs index 56bd15db..68b2efa7 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationBodyImportTest.cs @@ -1435,7 +1435,7 @@ namespace ClangSharp.Test public partial struct MyUnion { [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous struct at ClangUnsavedFile.h:3:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L3_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/StructDeclarationTest.cs index 067b2237..4100dcf4 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/StructDeclarationTest.cs @@ -935,7 +935,7 @@ public unsafe partial struct MyStruct public {expectedManagedType} y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -1014,13 +1014,13 @@ public unsafe partial struct _Anonymous_e__Struct {{ public {expectedManagedType} z; - [NativeTypeName(""struct (anonymous struct at ClangUnsavedFile.h:14:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C9"")] public _w_e__Struct w; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:19:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L19_C9"")] public _Anonymous1_e__Struct Anonymous1; - [NativeTypeName(""MyStruct::(anonymous union at ClangUnsavedFile.h:29:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L29_C9"")] public _Anonymous2_e__Union Anonymous2; public MyUnion u; @@ -1040,7 +1040,7 @@ public partial struct _Anonymous1_e__Struct {{ public {expectedManagedType} value1; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:23:13)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1114,7 +1114,7 @@ public partial struct MyStruct public int y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -1165,7 +1165,7 @@ public partial struct _Anonymous_e__Struct { public int z; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1504,7 +1504,7 @@ public partial struct MyStruct public double b; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/UnionDeclarationTest.cs index 3c540663..02f15c2e 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/UnionDeclarationTest.cs @@ -826,7 +826,7 @@ public unsafe partial struct MyUnion public {expectedManagedType} b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] @@ -912,7 +912,7 @@ public partial struct MyUnion public int y; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] @@ -966,7 +966,7 @@ public partial struct _Anonymous_e__Union public int z; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] @@ -1304,7 +1304,7 @@ public partial struct MyUnion public double b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationBodyImportTest.cs index 8e028231..dea83cdf 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationBodyImportTest.cs @@ -1435,7 +1435,7 @@ namespace ClangSharp.Test public partial struct MyUnion { [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous struct at ClangUnsavedFile.h:3:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L3_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/StructDeclarationTest.cs index bf2fc373..2527032b 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/StructDeclarationTest.cs @@ -939,7 +939,7 @@ public unsafe partial struct MyStruct public {expectedManagedType} y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -1018,13 +1018,13 @@ public unsafe partial struct _Anonymous_e__Struct {{ public {expectedManagedType} z; - [NativeTypeName(""struct (anonymous struct at ClangUnsavedFile.h:14:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C9"")] public _w_e__Struct w; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:19:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L19_C9"")] public _Anonymous1_e__Struct Anonymous1; - [NativeTypeName(""MyStruct::(anonymous union at ClangUnsavedFile.h:29:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L29_C9"")] public _Anonymous2_e__Union Anonymous2; public MyUnion u; @@ -1044,7 +1044,7 @@ public partial struct _Anonymous1_e__Struct {{ public {expectedManagedType} value1; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:23:13)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1118,7 +1118,7 @@ public partial struct MyStruct public int y; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -1169,7 +1169,7 @@ public partial struct _Anonymous_e__Struct { public int z; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Struct Anonymous; public partial struct _Anonymous_e__Struct @@ -1508,7 +1508,7 @@ public partial struct MyStruct public double b; - [NativeTypeName(""MyStruct::(anonymous struct at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/UnionDeclarationTest.cs index b24e6664..21aef7fc 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/UnionDeclarationTest.cs @@ -832,7 +832,7 @@ public unsafe partial struct MyUnion public {expectedManagedType} b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:{line}:{column})"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] @@ -918,7 +918,7 @@ public partial struct MyUnion public int y; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:6:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] @@ -972,7 +972,7 @@ public partial struct _Anonymous_e__Union public int z; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:10:9)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] public _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] @@ -1310,7 +1310,7 @@ public partial struct MyUnion public double b; [FieldOffset(0)] - [NativeTypeName(""MyUnion::(anonymous union at ClangUnsavedFile.h:7:5)"")] + [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] public _Anonymous_e__Union Anonymous; [UnscopedRef] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationBodyImportTest.cs index deee56dc..ccf8a28a 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationBodyImportTest.cs @@ -1629,7 +1629,7 @@ void MyFunction() - _Anonymous_e__Struct + _Anonymous_e__Struct ref int diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/StructDeclarationTest.cs index 2338d380..480c01d4 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/StructDeclarationTest.cs @@ -951,7 +951,7 @@ struct MyStruct {expectedManagedType} - _Anonymous_e__Struct + _Anonymous_e__Struct ref {expectedManagedType} @@ -1003,7 +1003,7 @@ struct MyStruct {expectedManagedType} - _w_e__Struct + _w_e__Struct MyUnion @@ -1086,7 +1086,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct ref int @@ -1129,7 +1129,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct @@ -1485,7 +1485,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Struct + _Anonymous_e__Struct ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/UnionDeclarationTest.cs index 456200a5..baecdca6 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/UnionDeclarationTest.cs @@ -776,7 +776,7 @@ union MyUnion {expectedManagedType} - _Anonymous_e__Union + _Anonymous_e__Union ref {expectedManagedType} @@ -856,7 +856,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union ref int @@ -899,7 +899,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union @@ -1201,7 +1201,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Union + _Anonymous_e__Union ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationBodyImportTest.cs index 41a052a1..83571b43 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationBodyImportTest.cs @@ -1629,7 +1629,7 @@ void MyFunction() - _Anonymous_e__Struct + _Anonymous_e__Struct ref int diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/StructDeclarationTest.cs index c29a9497..90d62aa6 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/StructDeclarationTest.cs @@ -957,7 +957,7 @@ struct MyStruct {expectedManagedType} - _Anonymous_e__Struct + _Anonymous_e__Struct ref {expectedManagedType} @@ -1009,7 +1009,7 @@ struct MyStruct {expectedManagedType} - _w_e__Struct + _w_e__Struct MyUnion @@ -1092,7 +1092,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct ref int @@ -1135,7 +1135,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct @@ -1490,7 +1490,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Struct + _Anonymous_e__Struct ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/UnionDeclarationTest.cs index 167f1861..cf417eca 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/UnionDeclarationTest.cs @@ -782,7 +782,7 @@ union MyUnion {expectedManagedType} - _Anonymous_e__Union + _Anonymous_e__Union ref {expectedManagedType} @@ -862,7 +862,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union ref int @@ -905,7 +905,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union @@ -1207,7 +1207,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Union + _Anonymous_e__Union ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationBodyImportTest.cs index 16eb65fc..074e5e7f 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationBodyImportTest.cs @@ -1611,7 +1611,7 @@ void MyFunction() - _Anonymous_e__Struct + _Anonymous_e__Struct ref int diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/StructDeclarationTest.cs index 371f1db0..2be7bcde 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/StructDeclarationTest.cs @@ -955,7 +955,7 @@ struct MyStruct {expectedManagedType} - _Anonymous_e__Struct + _Anonymous_e__Struct ref {expectedManagedType} @@ -992,7 +992,7 @@ struct MyStruct {expectedManagedType} - _w_e__Struct + _w_e__Struct MyUnion @@ -1076,7 +1076,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct ref int @@ -1113,7 +1113,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct @@ -1468,7 +1468,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Struct + _Anonymous_e__Struct ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/UnionDeclarationTest.cs index 68432fb4..2a08ef18 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/UnionDeclarationTest.cs @@ -780,7 +780,7 @@ union MyUnion {expectedManagedType} - _Anonymous_e__Union + _Anonymous_e__Union ref {expectedManagedType} @@ -851,7 +851,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union ref int @@ -888,7 +888,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union @@ -1190,7 +1190,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Union + _Anonymous_e__Union ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationBodyImportTest.cs index 4bd26387..3a1a633f 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationBodyImportTest.cs @@ -1611,7 +1611,7 @@ void MyFunction() - _Anonymous_e__Struct + _Anonymous_e__Struct ref int diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/StructDeclarationTest.cs index ff815cec..88559dda 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/StructDeclarationTest.cs @@ -961,7 +961,7 @@ struct MyStruct {expectedManagedType} - _Anonymous_e__Struct + _Anonymous_e__Struct ref {expectedManagedType} @@ -998,7 +998,7 @@ struct MyStruct {expectedManagedType} - _w_e__Struct + _w_e__Struct MyUnion @@ -1082,7 +1082,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct ref int @@ -1119,7 +1119,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct @@ -1474,7 +1474,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Struct + _Anonymous_e__Struct ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/UnionDeclarationTest.cs index be2402ba..bd94f902 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/UnionDeclarationTest.cs @@ -786,7 +786,7 @@ union MyUnion {expectedManagedType} - _Anonymous_e__Union + _Anonymous_e__Union ref {expectedManagedType} @@ -857,7 +857,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union ref int @@ -894,7 +894,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union @@ -1196,7 +1196,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Union + _Anonymous_e__Union ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationBodyImportTest.cs index 7a267db0..06cf0a52 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationBodyImportTest.cs @@ -1611,7 +1611,7 @@ void MyFunction() - _Anonymous_e__Struct + _Anonymous_e__Struct ref int diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/StructDeclarationTest.cs index a01bb085..4e5af074 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/StructDeclarationTest.cs @@ -955,7 +955,7 @@ struct MyStruct {expectedManagedType} - _Anonymous_e__Struct + _Anonymous_e__Struct ref {expectedManagedType} @@ -992,7 +992,7 @@ struct MyStruct {expectedManagedType} - _w_e__Struct + _w_e__Struct MyUnion @@ -1076,7 +1076,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct ref int @@ -1113,7 +1113,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct @@ -1468,7 +1468,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Struct + _Anonymous_e__Struct ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/UnionDeclarationTest.cs index e54b9725..b79b4d57 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/UnionDeclarationTest.cs @@ -780,7 +780,7 @@ union MyUnion {expectedManagedType} - _Anonymous_e__Union + _Anonymous_e__Union ref {expectedManagedType} @@ -851,7 +851,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union ref int @@ -888,7 +888,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union @@ -1190,7 +1190,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Union + _Anonymous_e__Union ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationBodyImportTest.cs index 4677b05a..0de2dc3f 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationBodyImportTest.cs @@ -1611,7 +1611,7 @@ void MyFunction() - _Anonymous_e__Struct + _Anonymous_e__Struct ref int diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/StructDeclarationTest.cs index 61c6b3c9..bbaaa12d 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/StructDeclarationTest.cs @@ -961,7 +961,7 @@ struct MyStruct {expectedManagedType} - _Anonymous_e__Struct + _Anonymous_e__Struct ref {expectedManagedType} @@ -998,7 +998,7 @@ struct MyStruct {expectedManagedType} - _w_e__Struct + _w_e__Struct MyUnion @@ -1082,7 +1082,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct ref int @@ -1119,7 +1119,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct @@ -1474,7 +1474,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Struct + _Anonymous_e__Struct ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/UnionDeclarationTest.cs index 6b228cd5..44326474 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/UnionDeclarationTest.cs @@ -786,7 +786,7 @@ union MyUnion {expectedManagedType} - _Anonymous_e__Union + _Anonymous_e__Union ref {expectedManagedType} @@ -857,7 +857,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union ref int @@ -894,7 +894,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union @@ -1196,7 +1196,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Union + _Anonymous_e__Union ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationBodyImportTest.cs index c5948562..aeed7100 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationBodyImportTest.cs @@ -1611,7 +1611,7 @@ void MyFunction() - _Anonymous_e__Struct + _Anonymous_e__Struct ref int diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/StructDeclarationTest.cs index e5e77598..8e572a54 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/StructDeclarationTest.cs @@ -955,7 +955,7 @@ struct MyStruct {expectedManagedType} - _Anonymous_e__Struct + _Anonymous_e__Struct ref {expectedManagedType} @@ -992,7 +992,7 @@ struct MyStruct {expectedManagedType} - _w_e__Struct + _w_e__Struct MyUnion @@ -1076,7 +1076,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct ref int @@ -1113,7 +1113,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct @@ -1468,7 +1468,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Struct + _Anonymous_e__Struct ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/UnionDeclarationTest.cs index 7a10e43c..40a4eb9a 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/UnionDeclarationTest.cs @@ -780,7 +780,7 @@ union MyUnion {expectedManagedType} - _Anonymous_e__Union + _Anonymous_e__Union ref {expectedManagedType} @@ -851,7 +851,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union ref int @@ -888,7 +888,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union @@ -1190,7 +1190,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Union + _Anonymous_e__Union ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationBodyImportTest.cs index d17f8bac..a7297c31 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationBodyImportTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationBodyImportTest.cs @@ -1611,7 +1611,7 @@ void MyFunction() - _Anonymous_e__Struct + _Anonymous_e__Struct ref int diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/StructDeclarationTest.cs index e51ecb81..b7711806 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/StructDeclarationTest.cs @@ -961,7 +961,7 @@ struct MyStruct {expectedManagedType} - _Anonymous_e__Struct + _Anonymous_e__Struct ref {expectedManagedType} @@ -998,7 +998,7 @@ struct MyStruct {expectedManagedType} - _w_e__Struct + _w_e__Struct MyUnion @@ -1082,7 +1082,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct ref int @@ -1119,7 +1119,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Struct + _Anonymous_e__Struct @@ -1474,7 +1474,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Struct + _Anonymous_e__Struct ref double diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/UnionDeclarationTest.cs index c81a29cb..4acc9f60 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/UnionDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/UnionDeclarationTest.cs @@ -786,7 +786,7 @@ union MyUnion {expectedManagedType} - _Anonymous_e__Union + _Anonymous_e__Union ref {expectedManagedType} @@ -857,7 +857,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union ref int @@ -894,7 +894,7 @@ protected override Task NestedAnonymousWithBitfieldTestImpl() int - _Anonymous_e__Union + _Anonymous_e__Union @@ -1196,7 +1196,7 @@ protected override Task RemapNestedAnonymousTestImpl() double - _Anonymous_e__Union + _Anonymous_e__Union ref double