This commit is contained in:
chrchr-github 2023-05-04 22:23:36 +02:00 committed by GitHub
parent a31c996a70
commit 1db510b9fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -3290,6 +3290,13 @@ private:
code = "typedef unsigned char unsigned char;\n" // don't hang
"void f(char);\n";
ASSERT_EQUALS("void f ( char ) ;", tok(code));
// #10796
code = "typedef unsigned a[7];\n"
"void f(unsigned N) {\n"
" a** p = new a * [N];\n"
"}\n";
TODO_ASSERT_EQUALS("does not compile", "void f ( int N ) { int ( * * p ) [ 7 ] ; p = new int ( * ) [ N ] [ 7 ] ; }", tok(code));
}
void simplifyTypedefFunction1() {