diff options
author | Jonathan Roelofs <jonathan@codesourcery.com> | 2017-01-18 18:12:39 +0000 |
---|---|---|
committer | Jonathan Roelofs <jonathan@codesourcery.com> | 2017-01-18 18:12:39 +0000 |
commit | 0cbb1dae894eec86e0a2978d5a0f101f1761983c (patch) | |
tree | e9dc8e2345542013fb3d26ff5858b00701c91f44 /test | |
parent | 7769ea25e4dc05094a74cb77cf83b9e5dc90491a (diff) |
Revert r286788
The Itanium ABI [1] specifies that __cxa_demangle accept either:
1) symbol names, which start with "_Z"
2) type manglings, which do not start with "_Z"
r286788 erroneously assumes that it should only handle symbols, so this patch
reverts it and adds a counterexample to the testcase.
1: https://mentorembedded.github.io/cxx-abi/abi.html#demangler
Reviewers: zygoloid, EricWF
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/test_demangle.pass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_demangle.pass.cpp b/test/test_demangle.pass.cpp index af16b56..effe5c0 100644 --- a/test/test_demangle.pass.cpp +++ b/test/test_demangle.pass.cpp @@ -29594,6 +29594,9 @@ const char* cases[][2] = // NOTE: disable this test since it is a negative test case, you cannot demangle a non-mangled symbol // {"\x6D", nullptr}, // This use to crash with ASAN {"_ZTIU4_farrVKPi", "typeinfo for int* const volatile restrict _far"}, + + // mangled names can include type manglings too, which don't start with _Z: + {"i", "int"}, }; const unsigned N = sizeof(cases) / sizeof(cases[0]); |