[libcxxabi] r325023 - [demangler] Support for inheriting constructors.
Erik Pilkington via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 13 09:09:07 PST 2018
Author: epilk
Date: Tue Feb 13 09:09:07 2018
New Revision: 325023
URL: http://llvm.org/viewvc/llvm-project?rev=325023&view=rev
Log:
[demangler] Support for inheriting constructors.
Fixes PR33223.
Modified:
libcxxabi/trunk/src/cxa_demangle.cpp
libcxxabi/trunk/test/test_demangle.pass.cpp
Modified: libcxxabi/trunk/src/cxa_demangle.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=325023&r1=325022&r2=325023&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Tue Feb 13 09:09:07 2018
@@ -2200,10 +2200,15 @@ Node *Db::parseCtorDtorName(Node *&SoFar
}
if (consumeIf('C')) {
+ bool IsInherited = consumeIf('I');
if (look() != '1' && look() != '2' && look() != '3' && look() != '5')
return nullptr;
++First;
ParsedCtorDtorCV = true;
+ if (IsInherited) {
+ if (legacyParse<parse_name>() == nullptr)
+ return nullptr;
+ }
return make<CtorDtorName>(SoFar, false);
}
Modified: libcxxabi/trunk/test/test_demangle.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_demangle.pass.cpp?rev=325023&r1=325022&r2=325023&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_demangle.pass.cpp (original)
+++ libcxxabi/trunk/test/test_demangle.pass.cpp Tue Feb 13 09:09:07 2018
@@ -29690,6 +29690,10 @@ const char* cases[][2] =
// Designated init expressions
{"_ZN15designated_init1fINS_1AEEEvDTtlT_di1adi1bdxLi3EdXLi1ELi4ELi9EEE", "void designated_init::f<designated_init::A>(decltype(designated_init::A{.a.b[3][1 ... 4] = 9}))"},
{"_Z1fIXtl1Xdi1adi1bdxLi3ELi1EEEE", "f<X{.a.b[3] = 1}>"},
+
+ // Inheriting constructors:
+ {"_ZN1BCI21AEi", "B::B(int)"},
+ {"_ZN1DCI21CIiEET_", "D::D(int)"},
};
const unsigned N = sizeof(cases) / sizeof(cases[0]);
More information about the cfe-commits
mailing list