translate-c: Handle typedef'ed void return type for functions.

Fixes #10356
This commit is contained in:
Evan Haas
2022-01-10 11:54:11 -08:00
committed by Andrew Kelley
parent 6d9c02a54f
commit f4b3f1d602
3 changed files with 22 additions and 5 deletions

View File

@@ -1809,4 +1809,14 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void {
\\ return 0;
\\}
, "");
cases.add("Typedef'ed void used as return type. Issue #10356",
\\typedef void V;
\\V foo(V *f) {}
\\int main(void) {
\\ int x = 0;
\\ foo(&x);
\\ return 0;
\\}
, "");
}