X = sizeof(int (void a));
X = sizeof(int (int, void));
X = sizeof(int (void, ...));
We now emit:
t.c:6:24: error: void argument may not have a name
X = sizeof(int (void a));
^
t.c:7:24: error: 'void' must be the first and only parameter if specified
X = sizeof(int (int, void));
^
t.c:8:19: error: 'void' must be the first and only parameter if specified
X = sizeof(int (void, ...));
^
And we pretty print this correctly (even though void isn't stored in the
arg list of the function type):
X = sizeof(int (void));
However, this approach will have to change to handle typedefs of void.
llvm-svn: 39235
This lets us pretty print stuff like this:
void foo() {
int X;
X = sizeof(void (*(*)())());
X = sizeof(int(*)(int, float, ...));
X = sizeof(void (*(int arga, void (*argb)(double Y)))(void* Z));
as:
X = sizeof(void (*(*)())())
X = sizeof(int (*)(int, float, ...))
X = sizeof(void (*(int, void (*)(double)))(void *))
Ah the wonders of 'modern' C syntax!
llvm-svn: 39232
thing properly. This allows us to print types like:
int (*A)[restrict static 4][6];
properly, in addition to representing them properly. :)
llvm-svn: 39178