summaryrefslogtreecommitdiffstats
path: root/clang/Parse
Commit message (Collapse)AuthorAgeFilesLines
...
* First patch toward rewriting of method definitions. This is work in progress.Fariborz Jahanian2007-11-082-13/+37
| | | | llvm-svn: 43915
* Refactored parsing of main function body for reuse by objective-c methods.Fariborz Jahanian2007-11-082-15/+19
| | | | llvm-svn: 43898
* AST for objective-c's @throw statement and its pretty-printing.Fariborz Jahanian2007-11-071-4/+6
| | | | llvm-svn: 43802
* Patch for objc2's property ASTs, as well as pretty-priting the ASTs.Fariborz Jahanian2007-11-061-6/+34
| | | | llvm-svn: 43778
* Implement rewrite rules for ObjC string constants.Steve Naroff2007-11-031-3/+3
| | | | llvm-svn: 43665
* pretty-print @try/@catch/@finally from AST as the validation of AST.Fariborz Jahanian2007-11-021-2/+3
| | | | llvm-svn: 43649
* AST for @try statement.Fariborz Jahanian2007-11-021-2/+7
| | | | llvm-svn: 43640
* AST for @finally statement.Fariborz Jahanian2007-11-021-3/+9
| | | | llvm-svn: 43629
* AST build for @catch clause (this is work in progress).Fariborz Jahanian2007-11-011-8/+19
| | | | llvm-svn: 43628
* Bunch of class declarations for objective-c's @try-catch statement.Fariborz Jahanian2007-11-011-5/+5
| | | | llvm-svn: 43623
* 1) More additions for objective-c's qualifier type.Fariborz Jahanian2007-10-311-9/+14
| | | | | | 2) Fixed a test failure (which should have failed all along!). llvm-svn: 43589
* Fix two rewriter bugs:Steve Naroff2007-10-311-5/+5
| | | | | | | | | | | | | | | | | | - For @class, don't generate multiple typedefs. - Handle the following edge case interface... @interface NSMiddleSpecifier : NSObject {} @end ...which was incorrectly being rewritten to... struct _interface_NSMiddleSpecifier { struct _interface_NSObject _NSObject; }; {} llvm-svn: 43582
* More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)Fariborz Jahanian2007-10-313-15/+56
| | | | llvm-svn: 43580
* Implement ObjC built-in types in MinimalAction.Steve Naroff2007-10-311-1/+13
| | | | | | This fixes the recent regression with selector-1.m and -parse-noop. llvm-svn: 43575
* Implement a more sensible strategy for ObjC built-in types (addressing a ↵Steve Naroff2007-10-311-0/+5
| | | | | | | | | | | | long standing FIXME in Sema::GetObjcIdType()). This removes several gross hacks to work around the previous "lazy" behavior. Two notes: - MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME. - I didn't convert Sema::GetObjcProtoType() yet. llvm-svn: 43567
* - Add location info to category/protocol AST'sSteve Naroff2007-10-301-1/+2
| | | | | | - Rewrite categories. llvm-svn: 43501
* Remove a couple FIXME's for rewriting ObjC interfaces (which are now being ↵Steve Naroff2007-10-301-4/+5
| | | | | | rewritten properly). llvm-svn: 43494
* More support for rewriting ObjC intefaces. Still some edge cases to handle...Steve Naroff2007-10-304-11/+21
| | | | llvm-svn: 43493
* Remove a bunch of TODO's that have been done for quite some time...Steve Naroff2007-10-291-5/+5
| | | | llvm-svn: 43476
* This commit contains lot's of small tweaks to how we pass around and store ↵Steve Naroff2007-10-292-12/+19
| | | | | | SourceLocation's for interfaces/protocols/categories/implementations. llvm-svn: 43475
* improve error recovery handling broken 'then' or 'else' stmts in Chris Lattner2007-10-291-10/+27
| | | | | | | | if statements. This implements Sema/if-empty-body.c:f3, silencing a bogus secondary warning. It also improve the location info for the nullstmts created for recovery purposes. llvm-svn: 43440
* The callers of ParseStructDeclaration are not expecting it toChris Lattner2007-10-291-6/+6
| | | | | | | | | | | | | | | | | | | eat the terminating ;. Fix one place where it did, allowing this to compile without error: struct x { int a; union { int b; float c; }; int d; }; This reduces diagnostics on PR1750 from 33 to 27. llvm-svn: 43437
* Fix a parser bug on labeled inline asm stmts, allowing usChris Lattner2007-10-291-0/+4
| | | | | | | | | | | | | | | | | | | | | to parse stuff like: asm volatile("1: rex64/fxrstor (%[fx])\n\t" "2:\n" ".section .fixup,\"ax\"\n" "3: movl $-1,%[err]\n" " jmp 2b\n" ".previous\n" ".section __ex_table,\"a\"\n" " .align 8\n" " .quad 1b,3b\n" ".previous" : [err] "=r" (err) : [fx] "cdaSDb" (fx), "m" (*fx), "0" (0)); This reduces # diagnostics on PR1750 from 49 to 37. llvm-svn: 43434
* Implement *skeletal* support for representing GNU inline asm stmts in the AST,Chris Lattner2007-10-291-4/+4
| | | | | | | resolving a crash on a .i file in PR1750. We now generate 49 errors on the .i file in that bug. llvm-svn: 43433
* Start rewriting ObjC interfaces. As a start, we comment out all the methods. ↵Steve Naroff2007-10-261-7/+10
| | | | | | This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's. llvm-svn: 43404
* Fix a recovery bug Fariborz and I noticed yesterday. We were producing:Chris Lattner2007-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | method.c:4:3: error: use of undeclared identifier 'BADIDENT' &BADIDENT, 0 ^ method.c:5:2: error: expected '}' }; ^ method.c:3:14: error: to match this '{' struct S A = { ^ now we only produce: method.c:4:3: error: use of undeclared identifier 'BADIDENT' &BADIDENT, 0 ^ llvm-svn: 43349
* add NL at end of fileGabor Greif2007-10-191-1/+1
| | | | llvm-svn: 43178
* Implementation of AST for @protocol expression.Fariborz Jahanian2007-10-171-4/+3
| | | | llvm-svn: 43075
* Fix location processing of @selector: the range should include the @ sign.Fariborz Jahanian2007-10-161-5/+5
| | | | llvm-svn: 43051
* Fix location processing of @encode: the range should include the @ sign.Chris Lattner2007-10-161-12/+12
| | | | | | @selector probably gets this wrong also. llvm-svn: 43048
* Fix problem dumping/printing method names with null selector.Fariborz Jahanian2007-10-161-4/+0
| | | | llvm-svn: 43039
* Patch to implement AST generation for objective-c's @selector expression.Fariborz Jahanian2007-10-161-4/+12
| | | | llvm-svn: 43038
* Patch to parse @selector expressions.Fariborz Jahanian2007-10-151-0/+42
| | | | llvm-svn: 43022
* Fix a parser bug with message expressions - need to call ↵Steve Naroff2007-10-152-4/+5
| | | | | | | | | | ParsePostfixExpressionSuffix(). Now were correctly allow the following... i = [str rangeOfString:@"]"].length; llvm-svn: 43012
* Add code generation and sema checking for __builtin_va_arg.Anders Carlsson2007-10-151-6/+10
| | | | llvm-svn: 43006
* - Added Sema::AddFactoryMethodToGlobalPool and ↵Steve Naroff2007-10-141-3/+4
| | | | | | | | | | | Sema::AddInstanceMethodToGlobalPool and DenseMaps. This will allow us to efficiently lookup a method from a selector given no type information (for the "id" data type). - Fixed some funky "} else {" indentation in Sema::ActOnAddMethodsToObjcDecl(). I'd prefer we stay away from this style...it wastes space and isn't any easier to read (from my perspective, at least:-) - Changed Parser::ParseObjCInterfaceDeclList() to only call Action::ActOnAddMethodsToObjcDecl() when it actually has methods to add (since most interface have methods, this is a very minor cleanup). llvm-svn: 42957
* This patch implementa objective-c's @compatibilty-alias declaration.Fariborz Jahanian2007-10-111-4/+11
| | | | llvm-svn: 42883
* Implemented parsing of objctive-c protocol conforming type used in Fariborz Jahanian2007-10-111-0/+10
| | | | | | | an identifier statement. Fixed up pretty priting to print this type correctly. llvm-svn: 42866
* Patch to create protocol conforming class types.Fariborz Jahanian2007-10-112-21/+24
| | | | llvm-svn: 42856
* resolve a fixme, by moving __builtin_va_list to a more logicalChris Lattner2007-10-101-19/+0
| | | | | | place and making it correctly parameterized on the target. llvm-svn: 42830
* Fix a latent bug in MinimalActions (created by a recent name change).Steve Naroff2007-10-101-2/+2
| | | | llvm-svn: 42829
* Remove Scope argument from ObjC actions that either don't need it or can now ↵Steve Naroff2007-10-103-12/+11
| | | | | | | | use TUScope. Also improve a recently added comment. llvm-svn: 42826
* Make sure methods with no return type default to "id".Steve Naroff2007-10-091-2/+3
| | | | | | | | | | This fixes a crasher in Sema::MatchTwoMethodDeclarations(), identified by selector-overload.m (just added). Added Action::ActOnTranslationUnitScope() and renamed Action::PopScope to ActOnPopScope. Added a Translation Unit Scope instance variable to Sema (will be very useful to ObjC-related actions, since ObjC declarations are always file-scoped). llvm-svn: 42817
* avoid a noop virtual method call on the hot scope poping path.Chris Lattner2007-10-091-2/+4
| | | | llvm-svn: 42809
* swtich to Token::is/isNotChris Lattner2007-10-091-100/+98
| | | | llvm-svn: 42798
* switch more code to use Token::is/isNot where possible.Chris Lattner2007-10-093-89/+87
| | | | llvm-svn: 42797
* switch some more of the parser over to using Token::is and isNotChris Lattner2007-10-093-90/+88
| | | | llvm-svn: 42796
* Add two new Token helper functions, "is" and "isNot". This allows us to writeChris Lattner2007-10-091-23/+23
| | | | | | | | | | | | | | | | | | | stuff like this: // If we don't have a comma, it is either the end of the list (a ';') or // an error, bail out. if (Tok.isNot(tok::comma)) break; instead of: // If we don't have a comma, it is either the end of the list (a ';') or // an error, bail out. if (Tok.getKind() != tok::comma) break; There is obviously no functionality change, but the code reads a bit better and is more terse. llvm-svn: 42795
* rename some "Parse" actions to "ActOn". Move code around inChris Lattner2007-10-091-16/+16
| | | | | | | | ParseFunctionDefinition so that ActOnFunctionDefBody is always called if ActOnStartOfFunctionDef is called. This fixes a crash reported by Nuno Lopes. llvm-svn: 42793
* Remove 2 protocol related actions from MinimalActions (protocols shouldn't ↵Steve Naroff2007-10-081-30/+0
| | | | | | be recognized as types). llvm-svn: 42777
OpenPOWER on IntegriCloud