Resubmit r339450 - [MS Demangler] Add conversion operator tests

This was broken because of a malformed check line.  Incidentally,
this exposed a case where we crash when we should just be returning
an error, so we should fix that.  The demangler shouldn't crash due
to user input.

llvm-svn: 339466
This commit is contained in:
Zachary Turner 2018-08-10 20:08:46 +00:00
parent 073620bc3b
commit 909b819cf9
1 changed files with 45 additions and 15 deletions

View File

@ -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> 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> 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
; 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<int> __thiscall CompoundTypeOps::operator struct Foo<int>(void)
??$?BH@CompoundTypeOps@@QAE?AU?$Bar@U?$Foo@H@@@@XZ
; CHECK: struct Bar<struct Foo<int>> __thiscall CompoundTypeOps::operator<int> struct Bar<struct Foo<int>>(void)
??$?BPAH@TemplateOps@@QAEPAHXZ
; CHECK: int * __thiscall TemplateOps::operator<int *> int *(void)