| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
structs and enums.
llvm-svn: 39298
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
like:
struct S { struct S {} X; };
with:
t.c:2:19: error: nested redefinition of 'struct'
struct S { struct S {} X; };
^
t.c:2:1: error: previous definition is here
struct S { struct S {} X; };
^
llvm-svn: 39292
|
|
|
|
| |
llvm-svn: 39290
|
|
|
|
| |
llvm-svn: 39288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Diagnose redefintion of tag types, e.g.:
t.c:7:8: error: redefinition of 'blah'
struct blah {};
^
t.c:1:8: error: previous definition is here
struct blah {
^
2 diagnostics generated.
llvm-svn: 39286
|
|
|
|
|
|
| |
converting a declspec with TST = struct/union. Pretty print as well.
llvm-svn: 39284
|
|
|
|
|
|
| |
Use it to hold the declaration object for a struct/union.
llvm-svn: 39282
|
|
|
|
| |
llvm-svn: 39281
|
|
|
|
| |
llvm-svn: 39280
|
|
|
|
| |
llvm-svn: 39279
|
|
|
|
| |
llvm-svn: 39278
|
|
|
|
|
|
| |
rename it to ParseTag.
llvm-svn: 39277
|
|
|
|
|
|
|
| |
or a definition/declaration of a tag. This is required to handle
C99 6.7.2.3p11 properly.
llvm-svn: 39274
|
|
|
|
| |
llvm-svn: 39270
|
|
|
|
| |
llvm-svn: 39268
|
|
|
|
|
|
|
|
| |
an extra scope stack to be pushed between the function body and arguments, which
causes the parser to incorrectly accept stuff like 'int foo(int A) { int A; }',
which is test/Parser/argument_redef.c.
llvm-svn: 39252
|
|
|
|
|
|
|
| |
This fixes a bug where a missing } could cause the scope stacks to get
unbalanced and will be used for function body parsing.
llvm-svn: 39249
|
|
|
|
|
|
| |
reinterpret_cast, and static_cast. Patch by Bill!
llvm-svn: 39247
|
|
|
|
| |
llvm-svn: 39242
|
|
|
|
|
|
| |
diagnosing malformed K&R function definitions.
llvm-svn: 39241
|
|
|
|
|
|
|
|
| |
void bar(int X, int X);
void blah(X, Y, X) int X, Y; {}
llvm-svn: 39239
|
|
|
|
|
|
|
| |
This allows us to handle typedefs of void correctly. This implements
clang/test/Sema/void_arg.c
llvm-svn: 39236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
declarator interface handles all alloc/dealloc issues related to the argument
list. Before the client had to alloc and Declarator did the dealloc.
llvm-svn: 39234
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 39231
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 39228
|
|
|
|
|
|
| |
for things like 'short _Complex'.
llvm-svn: 39227
|
|
|
|
| |
llvm-svn: 39226
|
|
|
|
| |
llvm-svn: 39225
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
things like:
t.c:4:10: error: invalid storage class specifier in function declarator
int foo2(auto int Aaslfkasdflkj, register B);
^
instead of:
t.c:4:19: error: invalid storage class specifier in function declarator
int foo2(auto int Aaslfkasdflkj, register B);
^
llvm-svn: 39224
|
|
|
|
| |
llvm-svn: 39223
|
|
|
|
| |
llvm-svn: 39222
|
|
|
|
| |
llvm-svn: 39221
|
|
|
|
| |
llvm-svn: 39219
|
|
|
|
| |
llvm-svn: 39217
|
|
|
|
|
|
|
|
| |
where P is a pointer.
int A[*P];
llvm-svn: 39199
|
|
|
|
|
|
|
|
|
|
| |
void B() {
memcpy (3, 2, 1);
}
where memcpy is undeclared.
llvm-svn: 39198
|
|
|
|
|
|
| |
called before and one which is called after function definition parsing.
llvm-svn: 39196
|
|
|
|
|
|
|
|
| |
int A() {
return X();
}
llvm-svn: 39194
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
allows us to handle stuff like:
typedef int G;
..
X = sizeof(G);
llvm-svn: 39189
|
|
|
|
|
|
| |
typedef.
llvm-svn: 39188
|
|
|
|
| |
llvm-svn: 39184
|
|
|
|
| |
llvm-svn: 39183
|
|
|
|
|
|
| |
Add a parsing fastpath for when we see typedef at the top-level.
llvm-svn: 39182
|
|
|
|
| |
llvm-svn: 39180
|
|
|
|
|
|
|
|
|
| |
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
|