Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Bug #: | Steve Naroff | 2007-06-01 | 1 | -1/+2 | |
| | | | | | | | | | | | | | | | Submitted by: Reviewed by: Implement support for GCC __attribute__. - Implement "TODO" in Parser::ParseAttributes. Changed the return type from void to Parser::DeclTy. Changed all call sites to accept the return value. - Added Action::ParseAttribute and Sema::ParseAttribute to return an appropriate AST node. Added new node AttributeDecl to Decl.h. Still to do...hook up to the Decl... llvm-svn: 39539 | |||||
* | Add support for inserting up to 10 strings in a diagnostic, with %0, %1, %2, | Chris Lattner | 2007-05-16 | 1 | -1/+1 | |
| | | | | | | etc. llvm-svn: 39447 | |||||
* | Do not invoke objc parser actions when a top level +/- is seen, unless objc | Chris Lattner | 2007-05-02 | 1 | -2/+13 | |
| | | | | | | is enabled. llvm-svn: 39430 | |||||
* | Generalize the skipping logic to allow skipping until any one of a set of | Chris Lattner | 2007-04-27 | 1 | -8/+11 | |
| | | | | | | tokens is found. llvm-svn: 39419 | |||||
* | Do not use ParseCompoundStatement to parse the body of a function. This causes | Chris Lattner | 2007-01-21 | 1 | -2/+4 | |
| | | | | | | | | 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 | |||||
* | Add support for parsing and pretty printing const_cast, dynamic_cast, | Chris Lattner | 2006-12-04 | 1 | -0/+1 | |
| | | | | | | reinterpret_cast, and static_cast. Patch by Bill! llvm-svn: 39247 | |||||
* | add some comments | Chris Lattner | 2006-12-04 | 1 | -2/+2 | |
| | | | | llvm-svn: 39242 | |||||
* | Scrutinize K&R parameter declarations. This implements C99 6.9.1p6, correctly | Chris Lattner | 2006-12-03 | 1 | -23/+130 | |
| | | | | | | 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 | -2/+2 | |
| | | | | | | | | 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 | |||||
* | record accurate sourceloc info for storage class specs, so we can report | Chris Lattner | 2006-11-28 | 1 | -1/+2 | |
| | | | | | | | | | | | | | | | | 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 | |||||
* | Finish converting DeclSpec to use accessors. | Chris Lattner | 2006-11-28 | 1 | -2/+5 | |
| | | | | llvm-svn: 39223 | |||||
* | split the ParseFunctionDefinition action into two actions, one which is | Chris Lattner | 2006-11-21 | 1 | -1/+3 | |
| | | | | | | called before and one which is called after function definition parsing. llvm-svn: 39196 | |||||
* | Create a new TypeNameType class, which represents typedefs as types. This | Chris Lattner | 2006-11-20 | 1 | -1/+1 | |
| | | | | | | | | | | allows us to handle stuff like: typedef int G; .. X = sizeof(G); llvm-svn: 39189 | |||||
* | add an action method for declspecs without declarators, like "struct foo;". | Chris Lattner | 2006-11-19 | 1 | -6/+1 | |
| | | | | llvm-svn: 39184 | |||||
* | build TypedefDecl objects when parsing typedefs. | Chris Lattner | 2006-11-19 | 1 | -1/+5 | |
| | | | | | | Add a parsing fastpath for when we see typedef at the top-level. llvm-svn: 39182 | |||||
* | Rename SemaDeclSpec.{h|cpp} back to DeclSpec.{h|cpp} now that the distinction | Chris Lattner | 2006-11-11 | 1 | -1/+1 | |
| | | | | | | between sema and parse is clear. llvm-svn: 39167 | |||||
* | remove diag helper that implicitly reports the diagnostic at the current | Chris Lattner | 2006-11-10 | 1 | -2/+2 | |
| | | | | | | token: it is better for the code to be explicit. llvm-svn: 39158 | |||||
* | Change courses on how we do semantic analysis. Semantic analysis | Chris Lattner | 2006-11-09 | 1 | -14/+2 | |
| | | | | | | | | 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 | |||||
* | rename SemaDecl.cpp/h to SemaDeclSpec.cpp/h | Chris Lattner | 2006-11-08 | 1 | -1/+1 | |
| | | | | llvm-svn: 39149 | |||||
* | rename these methods so that they read correctly. | Chris Lattner | 2006-11-08 | 1 | -3/+3 | |
| | | | | llvm-svn: 39148 | |||||
* | implement trivial scope caching. This reduces malloc traffic in the common | Chris Lattner | 2006-11-06 | 1 | -7/+27 | |
| | | | | | | | | | | | | | | | | | | | | | case, speeding up parsing of this contrived example: #define A {{}} #define B A A A A A A A A A A #define C B B B B B B B B B B #define D C C C C C C C C C C #define E D D D D D D D D D D #define F E E E E E E E E E E #define G F F F F F F F F F F #define H G G G G G G G G G G void foo() { H } from 7.478s to 4.321s. GCC requires 8.2s. llvm-svn: 39138 | |||||
* | Make Scope keep track of the kind of scope it is. Properly scope loop and | Chris Lattner | 2006-11-05 | 1 | -4/+4 | |
| | | | | | | | switch statements. Make break/continue check that they are inside of an appropriate control-flow construct. This implements Parser/bad-control.c. llvm-svn: 39136 | |||||
* | start factoring actions into two flavors: minimal and semantic actions. | Chris Lattner | 2006-11-05 | 1 | -2/+14 | |
| | | | | llvm-svn: 39133 | |||||
* | rename a bunch of files for better consistency | Chris Lattner | 2006-11-05 | 1 | -1/+1 | |
| | | | | llvm-svn: 39126 | |||||
* | need to add scope for arguments, but now is not the right time. | Chris Lattner | 2006-11-05 | 1 | -0/+8 | |
| | | | | llvm-svn: 39125 | |||||
* | Move objc productions to their own .cpp file. | Chris Lattner | 2006-11-05 | 1 | -85/+0 | |
| | | | | llvm-svn: 39124 | |||||
* | improve objc comments | Chris Lattner | 2006-11-05 | 1 | -7/+15 | |
| | | | | llvm-svn: 39123 | |||||
* | Add AST node, AST building, actions, and printing for 'for' stmts. | Chris Lattner | 2006-11-04 | 1 | -15/+17 | |
| | | | | llvm-svn: 39113 | |||||
* | Emit: | Chris Lattner | 2006-11-03 | 1 | -15/+21 | |
| | | | | | | | | | | test.m:2:14: error: expected ';' after @class @ class foo int x; ^ instead of silently accepting the malformed input. llvm-svn: 39100 | |||||
* | Fix case stmts to not fall through, rename methods, assert on unimplemented | Chris Lattner | 2006-11-03 | 1 | -25/+31 | |
| | | | | | | | | | | pieces, emit a diagnostic like this: test.m:4:1: error: unexpected '@' in program @ foo; ^ llvm-svn: 39099 | |||||
* | - Added basic structure for parsing top level Objective-C forms. | Steve Naroff | 2006-10-27 | 1 | -0/+75 | |
| | | | | | | | - Extended the typedef mechanism for classes, improved performance of the common case. - Implemented @class in the parser. llvm-svn: 39074 | |||||
* | Make ConsumeFoo methods return the location of the consumed token. | Chris Lattner | 2006-10-16 | 1 | -2/+1 | |
| | | | | llvm-svn: 38995 | |||||
* | implement action callbacks for almost all the stmts. | Chris Lattner | 2006-10-16 | 1 | -4/+4 | |
| | | | | llvm-svn: 38993 | |||||
* | Changes through out the parser and actions/ast interface to return top-level | Chris Lattner | 2006-10-16 | 1 | -17/+23 | |
| | | | | | | | | | | | | | | | | | | declarations through the asm streamer. For a testcase like: int G; int H, I, *J; int func() {} 'clang -parse-print-ast' prints: Read top-level decl: G Read top-level decl: H Read top-level decl: I Read top-level decl: J Read top-level decl: func llvm-svn: 38992 | |||||
* | start creating proper ast nodes for variables and functions | Chris Lattner | 2006-10-15 | 1 | -2/+2 | |
| | | | | llvm-svn: 38991 | |||||
* | Rename LexerToken methods to be more consistent. | Chris Lattner | 2006-10-14 | 1 | -1/+1 | |
| | | | | llvm-svn: 38969 | |||||
* | Initial support for semantic analysis and AST building for StringExpr nodes. | Chris Lattner | 2006-10-06 | 1 | -1/+2 | |
| | | | | llvm-svn: 38960 | |||||
* | Hook up more of the ASTStreamer | Chris Lattner | 2006-08-17 | 1 | -11/+33 | |
| | | | | llvm-svn: 38936 | |||||
* | Implement asm statement parsing. | Chris Lattner | 2006-08-15 | 1 | -16/+19 | |
| | | | | llvm-svn: 38929 | |||||
* | Make MatchRHSPunctuation smarter, allowing its clients to be simpler. | Chris Lattner | 2006-08-15 | 1 | -4/+11 | |
| | | | | llvm-svn: 38926 | |||||
* | Allow ExpectAndConsume to be used with any token. | Chris Lattner | 2006-08-15 | 1 | -1/+1 | |
| | | | | llvm-svn: 38923 | |||||
* | Parse asm specifiers on init declarators. Add __builtin_va_list to the | Chris Lattner | 2006-08-15 | 1 | -3/+64 | |
| | | | | | | symbol table at startup time. llvm-svn: 38922 | |||||
* | Rename Parse/ParserActions.h -> Parse/Action.h | Chris Lattner | 2006-08-14 | 1 | -4/+3 | |
| | | | | llvm-svn: 38913 | |||||
* | Add methods for scope manipulation. | Chris Lattner | 2006-08-14 | 1 | -12/+40 | |
| | | | | llvm-svn: 38909 | |||||
* | Implement initializer parsering. | Chris Lattner | 2006-08-13 | 1 | -1/+1 | |
| | | | | llvm-svn: 38900 | |||||
* | Parse things like 'struct X;' | Chris Lattner | 2006-08-13 | 1 | -3/+7 | |
| | | | | llvm-svn: 38898 | |||||
* | Add a new ExpectAndConsume method to make parsing easier, and add a new | Chris Lattner | 2006-08-12 | 1 | -17/+21 | |
| | | | | | | ConsumeAnyToken method. llvm-svn: 38894 | |||||
* | Implement parsing of array declarators like: | Chris Lattner | 2006-08-12 | 1 | -1/+1 | |
| | | | | | | int Array[*(int*)P+A]; llvm-svn: 38890 |