Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 14bd189

Browse files
committed
demangle with back references: add test cases
1 parent 73ad4b7 commit 14bd189

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

src/core/demangle.d

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,14 @@ version(unittest)
22652265
["_D5bug145Class3barMFNjZPv", "return void* bug14.Class.bar()"],
22662266
["_D5bug143fooFMPvZPv", "void* bug14.foo(scope void*)"],
22672267
["_D5bug143barFMNkPvZPv", "void* bug14.bar(scope return void*)"],
2268+
["_D3std5range15__T4iotaTtTtTtZ4iotaFtttZ6Result7opIndexMNgFNaNbNiNfmZNgt",
2269+
"inout pure nothrow @nogc @safe inout(ushort) std.range.iota!(ushort, ushort, ushort).iota(ushort, ushort, ushort).Result.opIndex(ulong)"],
2270+
["_D3std6format77__T6getNthVAyaa13_696e7465676572207769647468S233std6traits10isIntegralTiTkTkZ6getNthFNaNfkkkZi",
2271+
"pure @safe int std.format.getNth!(\"integer width\", std.traits.isIntegral, int, uint, uint).getNth(uint, uint, uint)"],
2272+
["_D3std11parallelism__T4TaskS8unittest3cmpTAyaTQeZQ2H6__dtorMFNfZv",
2273+
"@safe void std.parallelism.Task!(unittest.cmp, immutable(char)[], immutable(char)[]).Task.__dtor()"],
2274+
["_D3std11parallelism42__T16RoundRobinBufferTDFKAaZvTDxFNaNdNeZbZ16RoundRobinBuffer5primeMFZv",
2275+
"void std.parallelism.RoundRobinBuffer!(void delegate(ref char[]), const pure @property @trusted bool delegate()).RoundRobinBuffer.prime()"],
22682276

22692277
// back references
22702278
["_D4core4stdc5errnoQGFZi", "int core.stdc.errno.errno()"], // identifier back reference
@@ -2276,7 +2284,35 @@ version(unittest)
22762284
["_D13testexpansion__T1sTSQ2C__TQ1ATiZQ1GFiZ6ResultZQ3AFQ3bZQ1G3fooMFNaNfZv",
22772285
"pure @safe void testexpansion.s!(testexpansion.s!(int).s(int).Result).s(testexpansion.s!(int).s(int).Result).Result.foo()"],
22782286
["_D2rt4util9container5treap__T5TreapTS2gc11gcinterface4RootZQ3A6insertMFNbNiPSQP7F4NodeQ5aZQ1f",
2279-
"nothrow @nogc rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.Node* rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.insert(rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.Node*, gc.gcinterface.Root)" ],
2287+
"nothrow @nogc rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.Node* rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.insert(rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.Node*, gc.gcinterface.Root)"],
2288+
// ambiguity on 'V', template value argument or pascal function
2289+
["_D3std4conv__T7enumRepTyAaTEQ2G12experimental9allocator15building_blocks15stats_collector7OptionsVQ7bi64ZQ9ByQ8f",
2290+
"immutable(char[]) std.conv.enumRep!(immutable(char[]), std.experimental.allocator.building_blocks.stats_collector.Options, 64).enumRep"],
2291+
// symbol back reference to location with symbol back reference
2292+
["_D3std12experimental9allocator6common__T10reallocateTSQM5C15building_blocks17kernighan_ritchie__T8KRRegionTSQN5E14null_allocator13NullAllocatorZQ4HZQ10IFNaNbNiKQ10hKAvmZb",
2293+
"pure nothrow @nogc bool std.experimental.allocator.common.reallocate!(std.experimental.allocator.building_blocks.kernighan_ritchie.KRRegion!("
2294+
~"std.experimental.allocator.building_blocks.null_allocator.NullAllocator).KRRegion).reallocate(ref "
2295+
~"std.experimental.allocator.building_blocks.kernighan_ritchie.KRRegion!(std.experimental.allocator.building_blocks.null_allocator.NullAllocator).KRRegion, ref void[], ulong)"],
2296+
["_D3std9exception__T11doesPointToTASQ3D5regex8internal2ir10NamedGroupTQ3gTvZQ5GFNaNbNiNeKxASQO5GKxQiZb",
2297+
"pure nothrow @nogc @trusted bool std.exception.doesPointTo!(std.regex.internal.ir.NamedGroup[], "
2298+
~"std.regex.internal.ir.NamedGroup[], void).doesPointTo(ref const(std.regex.internal.ir.NamedGroup[]), ref const(std.regex.internal.ir.NamedGroup[]))"],
2299+
["_D3std9algorithm9iteration__T14SplitterResultS_DQ4G3uni7isWhiteFNaNbNiNfwZbTAyaZQ5B9__xtoHashFNbNeKxSQO9JZm",
2300+
"nothrow @trusted ulong std.algorithm.iteration.SplitterResult!(std.uni.isWhite(dchar), immutable(char)[]).SplitterResult."
2301+
~"__xtoHash(ref const(std.algorithm.iteration.SplitterResult!(std.uni.isWhite(dchar), immutable(char)[]).SplitterResult))"],
2302+
// [ "_D3std8typecons__T8NullableTCQL2H19__unittestL3090_156FZ12TestToStringVQ4dnZQ5I6__initZ", ""], // worse ambiguity on 'V'
2303+
// ["_D3std4conv__T7enumRepTyAaTEQL2G18__unittestL1205_34FNfZ2EFVQ3dex169FBE76C8B43958p0ZQ7AyQ6e", ""], // hex floats not supported correctly with VC runtime
2304+
["_D3std8typecons__T7TypedefTCQL2G19__unittestL6513_208FNfZ7MyClassVQ3jnVAyanZQ5I6__ctorMFNaNbNcNiNfQ7bZSQN10B",
2305+
"pure nothrow ref @nogc @safe std.typecons.Typedef!(std.typecons.__unittestL6513_208().MyClass, null, null).Typedef "
2306+
~"std.typecons.Typedef!(std.typecons.__unittestL6513_208().MyClass, null, null).Typedef.__ctor(std.typecons.__unittestL6513_208().MyClass)"],
2307+
["_D3std6getopt__TQ1ATAyaTDFNaNbNiNfQ1eZvTQ2aTDQ2aZQ4DFNfKAQ3hQ4aQ3jQ4gQ2fZSQL7C12GetoptResult",
2308+
"@safe std.getopt.GetoptResult std.getopt.getopt!(immutable(char)[], pure nothrow @nogc @safe void "
2309+
~"delegate(immutable(char)[]), immutable(char)[], pure nothrow @nogc @safe void delegate(immutable(char)[]))."
2310+
~"getopt(ref immutable(char)[][], immutable(char)[], pure nothrow @nogc @safe void delegate(immutable(char)[]), "
2311+
~"immutable(char)[], pure nothrow @nogc @safe void delegate(immutable(char)[]))"],
2312+
["_D3std5regex8internal9kickstart__T7ShiftOrTaZQ1B11ShiftThread__T3setS_DQQ6J10setInvMaskMFNaNbNiNfkkZvZQ3IMFNaNfwZv",
2313+
"pure @safe void std.regex.internal.kickstart.ShiftOr!(char).ShiftOr.ShiftThread.set!(std.regex.internal.kickstart.ShiftOr!(char).ShiftOr.ShiftThread.setInvMask(uint, uint)).set(dchar)"],
2314+
["_D3std5stdio4File__T8lockImplX10LockFileExTykZQ2GMFmmykZi",
2315+
"int std.stdio.File.lockImpl!(LockFileEx, immutable(uint)).lockImpl(ulong, ulong, immutable(uint))"],
22802316
];
22812317

22822318

0 commit comments

Comments
 (0)