1) We print __restrict twice on member pointers. This is fixed
and relevant tests are re-enabled.
2) Several tests were disabled because of printing slightly
different output than undname. These were confirmed to be
bugs in undname, so we just re-enable the tests.
3) The test for printing reference temporaries is re-enabled. This
is a clang mangling extension, so we have some flexibility with
how we demangle it. The output currently looks fine, so we just
re-enable the test with no fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339708
91177308-0d34-0410-b5e6-
96231b3b80d8
// FIXME: We should output this, but it requires updating lots of tests.
// if (Ty.Quals & Q_Pointer64)
// OS << " __ptr64";
- if (Quals & Q_Restrict)
- OS << " __restrict";
}
void MemberPointerType::outputPost(OutputStream &OS, NameResolver &Resolver) {
}
if (MangledName.consumeFront("$$C")) {
- if (MangledName.consumeFront("B"))
- ATy->Quals = Q_Const;
- else if (MangledName.consumeFront("C") || MangledName.consumeFront("D"))
- ATy->Quals = Qualifiers(Q_Const | Q_Volatile);
- else if (!MangledName.consumeFront("A"))
+ bool IsMember = false;
+ std::tie(ATy->Quals, IsMember) = demangleQualifiers(MangledName);
+ if (IsMember) {
Error = true;
+ return nullptr;
+ }
}
ATy->ElementType = demangleType(MangledName, QualifierMangleMode::Drop);
?f7@@YAXHPAHH0_N1PA_N@Z
; CHECK: void __cdecl f7(int, int *, int, int *, bool, bool, bool *)
-; FIXME: tests for more than 10 types?
-
?g1@@YAXUS@@@Z
; CHECK: void __cdecl g1(struct S)
?anonymous@?A@N@@3HA
; CHECK: int N::`anonymous namespace'::anonymous
-; FIXME: Reference Temporaries
-; ?$RT1@NeedsReferenceTemporary@@3ABHB
-; ?$RT1@NeedsReferenceTemporary@@3AEBHEB
+?$RT1@NeedsReferenceTemporary@@3ABHB
+; CHECK: int const &NeedsReferenceTemporary::$RT1
+?$RT1@NeedsReferenceTemporary@@3AEBHEB
+; CHECK: int const &NeedsReferenceTemporary::$RT1
?_c@@YAHXZ
; CHECK: int __cdecl _c(void)
?color2@@3QBNB
; CHECK: double const *const color2
-; FIXME-EXTRACONST: These tests fails because we print an extra const inside the parens.
-; ?color3@@3QAY02$$CBNA
-; FIXME-EXTRACONST: double const (*color3)[3]
+; undname prints `double const (* color3)[3]`, but this is a bug in undname.
+?color3@@3QAY02$$CBNA
+; CHECK: double const (*const color3)[3]
-; ?color4@@3QAY02$$CBNA
-; FIXME-EXTRACONST: double const (*color4)[3]
+; undname prints `double const (* color4)[3]`, but this is a bug in undname.
+?color4@@3QAY02$$CBNA
+; CHECK: double const (*const color4)[3]
?memptr1@@3RESB@@HES1@
; CHECK: int volatile B::*volatile memptr1
?f9@@YAQQS@@HXZ
; CHECK: int S::*const __cdecl f9(void)
-; We print __restrict twice here.
?f10@@YAPIQS@@HXZ
-; FIXME: int S::* __restrict __cdecl f10(void)
+; CHECK: int S::*__restrict __cdecl f10(void)
-; We print __restrict twice here.
?f11@@YAQIQS@@HXZ
-; FIXME: int S::* __restrict __cdecl f11(void)
+; CHECK: int S::*const __restrict __cdecl f11(void)
?g1@@YAP6AHH@ZXZ
; CHECK: int (__cdecl * __cdecl g1(void))(int)