[libcxxabi] r329600 - [demangler] Support for <data-member-prefix>.
Erik Pilkington via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 9 11:32:25 PDT 2018
Author: epilk
Date: Mon Apr 9 11:32:25 2018
New Revision: 329600
URL: http://llvm.org/viewvc/llvm-project?rev=329600&view=rev
Log:
[demangler] Support for <data-member-prefix>.
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=329600&r1=329599&r2=329600&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Mon Apr 9 11:32:25 2018
@@ -2639,6 +2639,8 @@ Node *Db::parseCtorDtorName(Node *&SoFar
// ::= <prefix> <data-member-prefix>
// extension ::= L
//
+// <data-member-prefix> := <member source-name> [<template-args>] M
+//
// <template-prefix> ::= <prefix> <template unqualified-name>
// ::= <template-param>
// ::= <substitution>
@@ -2669,6 +2671,13 @@ Node *Db::parseNestedName(NameState *Sta
while (!consumeIf('E')) {
consumeIf('L'); // extension
+ // <data-member-prefix> := <member source-name> [<template-args>] M
+ if (consumeIf('M')) {
+ if (SoFar == nullptr)
+ return nullptr;
+ continue;
+ }
+
// ::= <template-param>
if (look() == 'T') {
Node *TP = parseTemplateParam();
Modified: libcxxabi/trunk/test/test_demangle.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_demangle.pass.cpp?rev=329600&r1=329599&r2=329600&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_demangle.pass.cpp (original)
+++ libcxxabi/trunk/test/test_demangle.pass.cpp Mon Apr 9 11:32:25 2018
@@ -29740,6 +29740,9 @@ const char* cases[][2] =
{"_ZN1Scv7MuncherIJDpPT_EEIJFivEA_iEEEv", "S::operator Muncher<int (*)(), int (*) []><int (), int []>()"},
{"_Z2f8IiJ8identityIiES0_IfEEEvRAsPiDpT0_T_DpNS3_4typeEE_i", "void f8<int, identity<int>, identity<float> >(int (&) [sizeof... (int, identity<int>, identity<float>, int, identity<int>::type, identity<float>::type)])"},
+
+ {"_ZNK13StaticMembersIfE1xMUlvE_clEv", "StaticMembers<float>::x::'lambda'()::operator()() const"},
+ {"_ZNK10inline_varMUlvE_clEv", "inline_var::'lambda'()::operator()() const"},
};
const unsigned N = sizeof(cases) / sizeof(cases[0]);
More information about the cfe-commits
mailing list