Fix argument-less function pointer arguments with return type

This commit is contained in:
Luke Street 2023-02-02 15:56:09 -05:00
parent 286f3d1d29
commit c595c9dc86
1 changed files with 8 additions and 0 deletions

View File

@ -201,6 +201,7 @@ fn demangle_arg<'a>(
'w' => "wchar_t",
'v' => "void",
'e' => "...",
'_' => return Some((result, String::new(), rest)),
_ => return None,
});
result += post.as_str();
@ -678,6 +679,13 @@ mod tests {
demangle("test__FRCPCPCi", &options),
Some("test(const int* const* const&)".to_string()),
);
assert_eq!(
demangle(
"__ct__Q34nw4r2ut14CharStrmReaderFMQ34nw4r2ut14CharStrmReaderFPCvPv_Us",
&options
),
Some("nw4r::ut::CharStrmReader::CharStrmReader(unsigned short (nw4r::ut::CharStrmReader::*)())".to_string())
);
}
#[test]