; RUN: llvm-undname < %s | FileCheck %s ; CHECK-NOT: Invalid mangled name ?m@@3U?$J@UM@@$0A@@@A ; CHECK: struct J m ?m2@@3U?$K@UM@@$0?0@@A ; CHECK: struct K m2 ?n@@3U?$J@UN@@$HA@@@A ; CHECK: struct J n ?n2@@3U?$K@UN@@$0?0@@A ; CHECK: struct K n2 ?o@@3U?$J@UO@@$IA@A@@@A ; CHECK: struct J o ?o2@@3U?$K@UO@@$FA@?0@@A ; CHECK: struct K o2 ?p@@3U?$J@UP@@$JA@A@?0@@A ; CHECK: struct J p ?p2@@3U?$K@UP@@$GA@A@?0@@A ; CHECK: struct K p2 ??0?$ClassTemplate@$J??_9MostGeneral@@$BA@AEA@M@3@@QAE@XZ ; CHECK: __thiscall ClassTemplate<{[thunk]: __thiscall MostGeneral::`vcall'{0, {flat}}, 0, 12, 4}>::ClassTemplate<{[thunk]: __thiscall MostGeneral::`vcall'{0, {flat}}, 0, 12, 4}>(void)