diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-24 18:42:56 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-24 18:42:56 +0000 |
commit | b31402407404e987cf39b833005f6a63a95f1744 (patch) | |
tree | 19fa6ae851a07970e4e874158e894e49d907233d /test | |
parent | 279d648944d5d8f04ccab7f9670d338630923adb (diff) |
cxa_demangle: avoid butchering the last parameter type
Fix an off-by-one case which would destroy the final parameter in a
CV-qualified function type with a reference. We still get the CV
qualification incorrect, but at least we do not clobber the type name
any longer.
Partially fixes PR31741.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/test_demangle.pass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_demangle.pass.cpp b/test/test_demangle.pass.cpp index effe5c0..b307300 100644 --- a/test/test_demangle.pass.cpp +++ b/test/test_demangle.pass.cpp @@ -29597,6 +29597,12 @@ const char* cases[][2] = // mangled names can include type manglings too, which don't start with _Z: {"i", "int"}, + + // FIXME(compnerd) this should be void (int &) const + {"PKFvRiE", "void (*)(int const&)"}, + // TODO(compnerd) pretty print this as void (*)(unsigned long&) volatile &&" + {"PVFvRmOE", "void (*)(unsigned long&) volatile&&"}, + {"PFvRmOE", "void (*)(unsigned long&) &&"}, }; const unsigned N = sizeof(cases) / sizeof(cases[0]); |