- Dec 03, 2006
-
-
Chris Lattner authored
This allows us to handle typedefs of void correctly. This implements clang/test/Sema/void_arg.c llvm-svn: 39236
-
Chris Lattner authored
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
-
- Dec 02, 2006
-
-
Chris Lattner authored
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
-
Chris Lattner authored
llvm-svn: 39231
-
Chris Lattner authored
the info. Also, call Actions.ParseParamDeclaratorType instead of Actions.ParseDeclarator for parameter type lists: we don't want declaration objects created when parsing a function declarator, we just want type info. llvm-svn: 39230
-
Chris Lattner authored
parameters: build an array of ParamInfo structures and pass it to the declarator for safe keeping (it owns the list). Next step: actually populate the arg array with useful stuff. llvm-svn: 39229
-
- Nov 28, 2006
-
-
Chris Lattner authored
for things like 'short _Complex'. llvm-svn: 39227
-
Chris Lattner authored
llvm-svn: 39223
-
Chris Lattner authored
llvm-svn: 39222
-
Chris Lattner authored
llvm-svn: 39221
-
- Nov 21, 2006
-
-
Chris Lattner authored
the containing function. This avoids leaking decls. llvm-svn: 39197
-
Chris Lattner authored
called before and one which is called after function definition parsing. llvm-svn: 39196
-
- Nov 20, 2006
-
-
Chris Lattner authored
int A() { return X(); } llvm-svn: 39194
-
Chris Lattner authored
llvm-svn: 39193
-
Chris Lattner authored
typedef int X; int A() { return X; } int B() { return Y; } as: /Users/sabre/test.c:5:10: error: unexpected type name 'X': expected expression return X; ^ /Users/sabre/test.c:9:10: error: use of undeclared 'Y' value return Y; ^ llvm-svn: 39192
-
Chris Lattner authored
llvm-svn: 39191
-
Chris Lattner authored
typedef int G; X = sizeof(const G); X = sizeof(restrict G); llvm-svn: 39190
-
Chris Lattner authored
allows us to handle stuff like: typedef int G; .. X = sizeof(G); llvm-svn: 39189
-
Chris Lattner authored
typedef. llvm-svn: 39188
-
Chris Lattner authored
llvm-svn: 39187
-
Chris Lattner authored
llvm-svn: 39186
-
Chris Lattner authored
llvm-svn: 39185
-
- Nov 19, 2006
-
-
Chris Lattner authored
llvm-svn: 39184
-
Chris Lattner authored
Add a parsing fastpath for when we see typedef at the top-level. llvm-svn: 39182
-
Chris Lattner authored
void foo(int X) { X = __alignof(int); X = sizeof(const int** restrict ** volatile*); } as: x = __alignof(int) x = sizeof(int const **restrict **volatile *) llvm-svn: 39181
-
Chris Lattner authored
llvm-svn: 39180
-
- Nov 13, 2006
-
-
Chris Lattner authored
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
-
Chris Lattner authored
and for handling precedence of types more accurately llvm-svn: 39177
-
- Nov 12, 2006
-
-
Chris Lattner authored
This allows us to handle: int (*A)[restrict static 4][6]; for example. llvm-svn: 39176
-
Chris Lattner authored
llvm-svn: 39175
-
Chris Lattner authored
Teach getPointerType to (stupidly) memoize all created pointers. Give types an enum so we can implement classof. llvm-svn: 39174
-
Chris Lattner authored
parse (and print) things like: int* const* restrict* const volatile*** etc. llvm-svn: 39173
-
Chris Lattner authored
'unsigned char' and 'unsigned char const'. -Chris llvm-svn: 39172
-
Chris Lattner authored
llvm-svn: 39170
-
- Nov 11, 2006
-
-
Chris Lattner authored
llvm-svn: 39166
-
- Nov 10, 2006
-
-
Chris Lattner authored
llvm-svn: 39164
-
Chris Lattner authored
llvm-svn: 39162
-
Chris Lattner authored
llvm-svn: 39161
-
Chris Lattner authored
to SemaDecl.cpp llvm-svn: 39159
-
Chris Lattner authored
llvm-svn: 39157
-