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
2 files changed