Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | simplify structure body parsing code. Reorganize how tags are processed. | Chris Lattner | 2007-01-23 | 1 | -10/+31 | |
| | | | | | | | | | | | | | | 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 | |||||
* | fix some incorrect assertions | Chris Lattner | 2007-01-23 | 1 | -3/+4 | |
| | | | | llvm-svn: 39283 | |||||
* | There is no need for the Action::TagType enum, use DeclSpec::TST instead. | Chris Lattner | 2007-01-23 | 1 | -15/+15 | |
| | | | | llvm-svn: 39278 | |||||
* | Finish tag processing. Since it can be shared with C++ Classes and enums, | Chris Lattner | 2007-01-23 | 1 | -13/+23 | |
| | | | | | | rename it to ParseTag. llvm-svn: 39277 | |||||
* | Diagnose mixing of tags. For example, for: | Chris Lattner | 2007-01-23 | 1 | -7/+15 | |
| | | | | | | | | | | | | | | | | 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 | |||||
* | When parsing a struct/union tag, we need to know whether the tag is a use | Chris Lattner | 2007-01-23 | 1 | -2/+18 | |
| | | | | | | | or a definition/declaration of a tag. This is required to handle C99 6.7.2.3p11 properly. llvm-svn: 39274 | |||||
* | Unstack identifiers more carefully when poping scope. Add assertion to ↵ | Chris Lattner | 2007-01-23 | 1 | -1/+18 | |
| | | | | | | | | | catch the bad case and handle identifiers in the same namespace correctly. This implements test/Parser/c-namespace.c llvm-svn: 39272 | |||||
* | Make name lookup properly obey C namespaces, simplify decl construction by | Chris Lattner | 2007-01-22 | 1 | -19/+57 | |
| | | | | | | | eliminating the 'next' pointer from the ctor, and add initial support for parsing struct/union tags. llvm-svn: 39265 | |||||
* | Change scopes to maintain decls, not identifiers. | Chris Lattner | 2007-01-21 | 1 | -13/+22 | |
| | | | | | | | | | | | | | | 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 | |||||
* | Handle C99 6.7.5.3p10, fixing test/Parser/attributes.c | Chris Lattner | 2007-01-21 | 1 | -2/+10 | |
| | | | | llvm-svn: 39256 | |||||
* | Next big step in function parsing: create decl objects for parameters, | Chris Lattner | 2007-01-21 | 1 | -7/+35 | |
| | | | | | | | inserting them into the function body scope and registering them with the corresponding FunctionDecl. llvm-svn: 39253 | |||||
* | add some comments | Chris Lattner | 2006-12-04 | 1 | -3/+12 | |
| | | | | llvm-svn: 39242 | |||||
* | Scrutinize K&R parameter declarations. This implements C99 6.9.1p6, correctly | Chris Lattner | 2006-12-03 | 1 | -0/+23 | |
| | | | | | | diagnosing malformed K&R function definitions. llvm-svn: 39241 | |||||
* | Next step of retaining information about function prototypes: actually retain | Chris Lattner | 2006-12-02 | 1 | -1/+1 | |
| | | | | | | | | 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 | |||||
* | First step towards accurately retaining information about function | Chris Lattner | 2006-12-02 | 1 | -1/+1 | |
| | | | | | | | | | 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 | |||||
* | capture sourcelocation info for type specifiers. This improves diagnostics | Chris Lattner | 2006-11-28 | 1 | -1/+1 | |
| | | | | | | for things like 'short _Complex'. llvm-svn: 39227 | |||||
* | Finish converting DeclSpec to use accessors. | Chris Lattner | 2006-11-28 | 1 | -2/+4 | |
| | | | | llvm-svn: 39223 | |||||
* | When a decl is popped from its current scope, link it to the decl chain for | Chris Lattner | 2006-11-21 | 1 | -5/+10 | |
| | | | | | | the containing function. This avoids leaking decls. llvm-svn: 39197 | |||||
* | split the ParseFunctionDefinition action into two actions, one which is | Chris Lattner | 2006-11-21 | 1 | -6/+17 | |
| | | | | | | called before and one which is called after function definition parsing. llvm-svn: 39196 | |||||
* | Add support for C90 implicitly defined functions, e.g.: | Chris Lattner | 2006-11-20 | 1 | -0/+28 | |
| | | | | | | | | int A() { return X(); } llvm-svn: 39194 | |||||
* | remember and pretty-print cast types | Chris Lattner | 2006-11-20 | 1 | -0/+2 | |
| | | | | llvm-svn: 39191 | |||||
* | when a typedef name is parsed as part of declspecs, remember the decl for the | Chris Lattner | 2006-11-20 | 1 | -3/+2 | |
| | | | | | | typedef. llvm-svn: 39188 | |||||
* | decls should all have types | Chris Lattner | 2006-11-19 | 1 | -5/+4 | |
| | | | | llvm-svn: 39187 | |||||
* | remove #include of clang/Parse/DeclSpec.h from clang/AST/Decl.h | Chris Lattner | 2006-11-19 | 1 | -5/+4 | |
| | | | | llvm-svn: 39186 | |||||
* | implement RTTI for Decl objects, eliminate some hokey virtual methods. | Chris Lattner | 2006-11-19 | 1 | -5/+7 | |
| | | | | llvm-svn: 39185 | |||||
* | add an action method for declspecs without declarators, like "struct foo;". | Chris Lattner | 2006-11-19 | 1 | -1/+16 | |
| | | | | llvm-svn: 39184 | |||||
* | build TypedefDecl objects when parsing typedefs. | Chris Lattner | 2006-11-19 | 1 | -21/+35 | |
| | | | | | | Add a parsing fastpath for when we see typedef at the top-level. llvm-svn: 39182 | |||||
* | implement conversion of simple declspec base types, and implement TypeRef::dump | Chris Lattner | 2006-11-11 | 1 | -1/+1 | |
| | | | | llvm-svn: 39170 | |||||
* | restructure code to build the framework for creating types from declarators. | Chris Lattner | 2006-11-11 | 1 | -0/+8 | |
| | | | | llvm-svn: 39166 | |||||
* | introduce a new ASTContext class to hold long-lived ast nodes. | Chris Lattner | 2006-11-10 | 1 | -1/+0 | |
| | | | | llvm-svn: 39161 | |||||
* | move the rest of the expr sema to SemaExpr.cpp and the decl processing stuff | Chris Lattner | 2006-11-10 | 1 | -2/+63 | |
| | | | | | | to SemaDecl.cpp llvm-svn: 39159 | |||||
* | Change courses on how we do semantic analysis. Semantic analysis | Chris Lattner | 2006-11-09 | 1 | -0/+18 | |
fundamentally requires having an AST around, so move all sema to the AST library. This is the first step, later steps will be needed to clean up libast. llvm-svn: 39150 |