- Jan 26, 2007
-
-
Chris Lattner authored
llvm-svn: 39304
-
- Jan 25, 2007
-
-
Chris Lattner authored
struct q { int a, a; }; with: t.c:3:19: error: duplicate member 'a' struct q { int a, a; }; ^ t.c:3:16: error: previous definition is here struct q { int a, a; }; ^ llvm-svn: 39303
-
Chris Lattner authored
This emits these diagnostics: t.c:4:14: error: redefinition of 'a' enum foo22 { a, b }; ^ t.c:3:5: error: previous definition is here int a; ^ t.c:8:17: error: redefinition of enumerator 'b' enum foo23 { c, b }; ^ t.c:4:17: error: previous definition is here enum foo22 { a, b }; ^ 4 diagnostics generated. for: int a; enum foo22 { a, b }; enum foo23 { c, b }; llvm-svn: 39302
-
Chris Lattner authored
the EnumDecl when the enum type is complete. This allows us to detect redefinitions of enums. llvm-svn: 39300
-
Chris Lattner authored
t.c:2:6: warning: ISO C forbids forward references to 'enum' types enum foo22* X; ^ llvm-svn: 39299
-
Chris Lattner authored
llvm-svn: 39297
-
Chris Lattner authored
t.c:10:15: warning: 'bonk' may not be nested in a struct due to flexible array member struct bink bonk; ^ t.c:13:14: error: 'struct bink' may not be used as an array element due to flexible array member struct bink A[123]; ^ for: struct bink { struct bink *a; int X[]; // ok. }; struct foo { int A; struct bink bonk; }; struct bink A[123]; llvm-svn: 39296
-
- Jan 24, 2007
-
-
Chris Lattner authored
struct bork { int X[]; }; struct bink { struct bink a; int X[]; // ok. }; to: t.c:3:7: error: flexible array 'X' not allowed in otherwise empty struct int X[]; ^ t.c:7:15: error: field 'a' has incomplete type struct bink a; ^ llvm-svn: 39295
-
Chris Lattner authored
t.c:5:8: error: field 'foo' declared as a function void foo(); ^ llvm-svn: 39294
-
Chris Lattner authored
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
-
- Jan 23, 2007
-
-
Chris Lattner authored
llvm-svn: 39291
-
Chris Lattner authored
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
-
Chris Lattner authored
converting a declspec with TST = struct/union. Pretty print as well. llvm-svn: 39284
-
Chris Lattner authored
llvm-svn: 39283
-
Chris Lattner authored
Use it to hold the declaration object for a struct/union. llvm-svn: 39282
-
Chris Lattner authored
llvm-svn: 39278
-
Chris Lattner authored
rename it to ParseTag. llvm-svn: 39277
-
Chris Lattner authored
struct blah * P; union blah *P2; we now emit: t.c:2:1: error: redefinition of 'blah' with tag that does not match previous use union blah *P2; ^ t.c:1:8: error: previous use is here struct blah * P; ^ llvm-svn: 39275
-
Chris Lattner authored
or a definition/declaration of a tag. This is required to handle C99 6.7.2.3p11 properly. llvm-svn: 39274
-
Chris Lattner authored
case and handle identifiers in the same namespace correctly. This implements test/Parser/c-namespace.c llvm-svn: 39272
-
- Jan 22, 2007
-
-
Chris Lattner authored
Make name lookup properly obey C namespaces, simplify decl construction byeliminating the 'next' pointer from the ctor, and add initial support forparsing struct/union tags. llvm-svn: 39266
-
Chris Lattner authored
eliminating the 'next' pointer from the ctor, and add initial support for parsing struct/union tags. llvm-svn: 39265
-
- Jan 21, 2007
-
-
Chris Lattner authored
Detect and emit errors when names are redefined in the same scope, e.g. test/Parser/argument_redef.c, which now emits: argument_redef.c:4:22: error: redefinition of 'A' int foo(int A) { int A; } ^ argument_redef.c:4:13: error: previous definition is here int foo(int A) { int A; } ^ llvm-svn: 39257
-
Chris Lattner authored
llvm-svn: 39256
-
Chris Lattner authored
inserting them into the function body scope and registering them with the corresponding FunctionDecl. llvm-svn: 39253
-
- Dec 04, 2006
-
-
Chris Lattner authored
reinterpret_cast, and static_cast. Patch by Bill! llvm-svn: 39247
-
Chris Lattner authored
llvm-svn: 39242
-
- Dec 03, 2006
-
-
Chris Lattner authored
diagnosing malformed K&R function definitions. llvm-svn: 39241
-
Chris Lattner authored
void foo(void (*q)(a,b,c)) {} llvm-svn: 39240
-
Chris Lattner authored
void bar(int X, int X); void blah(X, Y, X) int X, Y; {} llvm-svn: 39239
-
Chris Lattner authored
llvm-svn: 39238
-
Chris Lattner authored
This allows us to handle typedefs of void correctly. This implements clang/test/Sema/void_arg.c llvm-svn: 39236
-
- 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
-