[libcxxabi] r326871 - [demangler] Fix a mistake in r326797.
Erik Pilkington via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 6 20:29:33 PST 2018
Author: epilk
Date: Tue Mar 6 20:29:33 2018
New Revision: 326871
URL: http://llvm.org/viewvc/llvm-project?rev=326871&view=rev
Log:
[demangler] Fix a mistake in r326797.
Thanks to Nico Weber for pointing this out!
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=326871&r1=326870&r2=326871&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Tue Mar 6 20:29:33 2018
@@ -4788,8 +4788,8 @@ Node *Db::parse() {
Node *Encoding = parseEncoding();
if (Encoding == nullptr || !consumeIf("_block_invoke"))
return nullptr;
- consumeIf('_');
- if (parseNumber().empty())
+ bool RequireNumber = consumeIf('_');
+ if (parseNumber().empty() && RequireNumber)
return nullptr;
if (numLeft() != 0)
return nullptr;
Modified: libcxxabi/trunk/test/test_demangle.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_demangle.pass.cpp?rev=326871&r1=326870&r2=326871&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_demangle.pass.cpp (original)
+++ libcxxabi/trunk/test/test_demangle.pass.cpp Tue Mar 6 20:29:33 2018
@@ -29716,6 +29716,8 @@ const char* cases[][2] =
// ABI tags can apply to built-in substitutions.
{"_Z1fSsB1XS_", "f(std::string[abi:X], std::string[abi:X])"},
+
+ {"___Z10blocksNRVOv_block_invoke", "invocation function for block in blocksNRVO()"},
};
const unsigned N = sizeof(cases) / sizeof(cases[0]);
More information about the cfe-commits
mailing list