aboutsummaryrefslogtreecommitdiff
path: root/Parse/ParseObjc.cpp
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13improve DeclStmt to be able to store SourceRange info correctly.Chris Lattner
Set the start of DeclStmt range. Right now the end is meaningless though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48330 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10implement simple support for arbitrary token lookahead. Change the Chris Lattner
objc @try parser to use it, fixing a FIXME. Update the objc-try-catch-1.m file to pass now that we get more reasonable errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48129 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29Fix http://llvm.org/bugs/show_bug.cgi?id=2106.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14ParseCompoundStatementBody expects to only be called with { as the currentChris Lattner
token. Diagnose when the { is missing in objc @try blocks instead of aborting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47130 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Add a FIXME to clarify previous commit/experiment.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46782 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword ↵Steve Naroff
statements/expressions. This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30On an unexpected @foo keyword, return failure instead of a 'successful' null ↵Chris Lattner
AST. This fixes a segfault on things like @foo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46574 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Fixed misc. issues raised by Chris L. on @synchronized implementation.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29AST for @synchronized.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29Bunch of type defs, etc. for @synchronized.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46520 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25Add support for dispatching an objc message to a variable Chris Lattner
in an initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25Factor a complex predicate out to a helper method.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46365 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25split the second half of ParseObjCMessageExpression into a new Chris Lattner
ParseObjCMessageExpressionBody method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Warn (as gcc does) when @end does not close anything.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45834 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek
some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Minor changes as suggested by Chris L.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45598 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Patch to parse/build AST ObjC2's foreach statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02New declarations/defs for Objc2's foreach-statement. This is work in progress.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Prevent crash on incorrect objc messaging expression.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-27 - Use Tok.isObjCAtKeyword instead of ↵Chris Lattner
Tok.getIdentifierInfo()->getObjCKeywordID(). The later fails if the token is not an identifier. - Replace tabs with spaces. - Various other cleanups. Patch by Nico Weber! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45368 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13use new interface.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44978 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12Concatenation of objc strings.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44964 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12move function to a more logical location, add its grammar productions.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44923 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12Add ObjC parser support for concatenated ObjC strings. Note thatChris Lattner
this is passed to sema and ignored there, so the second part of the string will not make it into the AST. Passing to Fariborz to finish Sema + AST construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Fixed a parsing bug whereby @optional/@required keyword is not followed by Fariborz Jahanian
a method declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44870 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05Make sure Parser::ParseObjCSelectorExpression() handles unary selectors ↵Steve Naroff
(with no arguments) properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44636 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15Finish up variadic methods/messages.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44172 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15Implement support for variadic methods (work in progress).Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44171 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15Handle "bool" in all places that touch _Bool. Chris Lattner
This fixes code like "if((bool)x) {}" for example. Patch by Nate Begeman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44159 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13Rewrite method definition bodies. Also renamed a method to distinguish ↵Steve Naroff
between method declarations and definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44080 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12'super' nailed.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44025 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12Add an error diagnostic to Parse::ParseObjCMessageExpression().Steve Naroff
This now exposes the following bug... ******************** TEST 'Sema/message.m' FAILED! ******************** Command: clang -fsyntax-only -verify Sema/message.m Output: Errors seen but not expected: Line 9: invalid receiver to message expression ******************** TEST 'Sema/message.m' FAILED! ******************** As far as I can tell, all messages to method agruments fail. The method arguments are built by Sema::ObjcActOnStartOfMethodDef(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11Replace 2 method definition actions (ActOnFunctionDefBody, ↵Steve Naroff
ActOnMethodDefBody) with 1 method definition action (ActOnFinishFunctionBody). I can't think of any reason that we would need two action hooks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44000 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11Replace 3 method definition functions (ObjcParseMethodDefinition, ↵Steve Naroff
ParseObjCInstanceMethodDefinition, ParseObjCClassMethodDefinition) with 1 method definition function (ParseObjCMethodDefinition). Less code/confusion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43999 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() ↵Steve Naroff
about private methods (r43989). While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end). Other details... - Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments. - Removed Parser::AllImplMethods (a nice cleanup). - Added location info to ObjcImplementationDecl (since we will need it very soon:-) - Modified message.m test to no longer allow the bogus diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43995 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-10pretty priting for method definitions.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-10Represent method definitions as separate AST nodes. Pretty print will come next.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43979 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-09Some code clean up in the form of name changes for functions whichFariborz Jahanian
process method definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-09Added class context to method declarations. Provide "interface *" typeFariborz Jahanian
to 'self' method of instance methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43957 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-08First patch toward rewriting of method definitions. This is work in progress.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43915 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-07AST for objective-c's @throw statement and its pretty-printing.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43802 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-06Patch for objc2's property ASTs, as well as pretty-priting the ASTs.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43778 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-03Implement rewrite rules for ObjC string constants.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43665 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02pretty-print @try/@catch/@finally from AST as the validation of AST.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43649 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02AST for @try statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43640 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02AST for @finally statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43629 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01AST build for @catch clause (this is work in progress).Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43628 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01Bunch of class declarations for objective-c's @try-catch statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43623 91177308-0d34-0410-b5e6-96231b3b80d8