From 8da2e112bcd2eda0529c0ea0f5e32997abe4f82f Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 10 Aug 2018 16:55:59 +0000 Subject: [PATCH] [MS Demangler] Add conversion operator tests. The mangled names were added in the original commit, but the demangled equivalents weren't, so nothing was actually being checked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339450 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Demangle/ms-conversion-operators.test | 60 ++++++++++++++++------ 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/test/Demangle/ms-conversion-operators.test b/test/Demangle/ms-conversion-operators.test index afc34aab4fa..91c17d10964 100644 --- a/test/Demangle/ms-conversion-operators.test +++ b/test/Demangle/ms-conversion-operators.test @@ -3,19 +3,49 @@ ; CHECK-NOT: Invalid mangled name ??$?BH@TemplateOps@@QAEHXZ -??BOps@@QAEHXZ -??BConstOps@@QAE?BHXZ -??BVolatileOps@@QAE?CHXZ -??BConstVolatileOps@@QAE?DHXZ -??$?BN@TemplateOps@@QAENXZ -??BOps@@QAENXZ -??BConstOps@@QAE?BNXZ -??BVolatileOps@@QAE?CNXZ -??BConstVolatileOps@@QAE?DNXZ -??BCompoundTypeOps@@QAEPAHXZ -??BCompoundTypeOps@@QAEPBHXZ -??BCompoundTypeOps@@QAE$$QAHXZ -??BCompoundTypeOps@@QAE?AU?$Foo@H@@XZ -??$?BH@CompoundTypeOps@@QAE?AU?$Bar@U?$Foo@H@@@@XZ -??$?BPAH@TemplateOps@@QAEPAHXZ +; CHECK: int __thiscall TemplateOps::operator int(void) +??BOps@@QAEHXZ +; CHECK: int __thiscall Ops::operator int(void) + +??BConstOps@@QAE?BHXZ +; CHECK: int const __thiscall ConstOps::operator int const(void) + +??BVolatileOps@@QAE?CHXZ +; CHECK: int volatile __thiscall VolatileOps::operator int volatile(void) + +??BConstVolatileOps@@QAE?DHXZ +; CHECK: int const volatile __thiscall ConstVolatileOps::operator int const volatile(void) + +??$?BN@TemplateOps@@QAENXZ +; CHECK: double __thiscall TemplateOps::operator double(void) + +??BOps@@QAENXZ +; CHECK: double __thiscall Ops::operator double(void) + +??BConstOps@@QAE?BNXZ +; CHECK: double const __thiscall ConstOps::operator double const(void) + +??BVolatileOps@@QAE?CNXZ +; CHECK: double volatile __thiscall VolatileOps::operator double volatile(void) + +??BConstVolatileOps@@QAE?DNXZ +; CHECK: double const volatile __thiscall ConstVolatileOps::operator double const volatile(void) + +??BCompoundTypeOps@@QAEPAHXZ +i; CHECK: nt * __thiscall CompoundTypeOps::operator int *(void) + +??BCompoundTypeOps@@QAEPBHXZ +; CHECK: int const * __thiscall CompoundTypeOps::operator int const *(void) + +??BCompoundTypeOps@@QAE$$QAHXZ +; CHECK: int && __thiscall CompoundTypeOps::operator int &&(void) + +??BCompoundTypeOps@@QAE?AU?$Foo@H@@XZ +; CHECK: struct Foo __thiscall CompoundTypeOps::operator struct Foo(void) + +??$?BH@CompoundTypeOps@@QAE?AU?$Bar@U?$Foo@H@@@@XZ +; CHECK: struct Bar> __thiscall CompoundTypeOps::operator struct Bar>(void) + +??$?BPAH@TemplateOps@@QAEPAHXZ +; CHECK: int * __thiscall TemplateOps::operator int *(void)