summaryrefslogtreecommitdiffstats
path: root/clang/Parse
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a fixme, by only parsing extern "C" in C++ mode.Chris Lattner2008-01-121-2/+1
| | | | llvm-svn: 45905
* Add first pieces of support for parsing and representing Chris Lattner2008-01-122-0/+46
| | | | | | extern "C" in C++ mode. Patch by Mike Stump! llvm-svn: 45904
* Warn (as gcc does) when @end does not close anything.Fariborz Jahanian2008-01-101-6/+3
| | | | llvm-svn: 45834
* Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek2008-01-073-67/+67
| | | | | | | some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. llvm-svn: 45715
* Added a comment, minor refactoring of foreach parsing code per Chris's ↵Fariborz Jahanian2008-01-042-10/+13
| | | | | | suggestion. llvm-svn: 45601
* Minor changes as suggested by Chris L.Fariborz Jahanian2008-01-043-9/+6
| | | | llvm-svn: 45598
* Patch to parse/build AST ObjC2's foreach statement.Fariborz Jahanian2008-01-033-33/+58
| | | | llvm-svn: 45539
* New declarations/defs for Objc2's foreach-statement. This is work in progress.Fariborz Jahanian2008-01-022-0/+11
| | | | llvm-svn: 45511
* Issue diagnostic when objective-c's @interface is preceeded by a type specifier.Fariborz Jahanian2008-01-021-0/+3
| | | | llvm-svn: 45491
* Prevent crash on incorrect objc messaging expression.Fariborz Jahanian2008-01-021-2/+2
| | | | llvm-svn: 45489
* remove attribution from makefiles.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45412
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-2911-22/+22
| | | | | | discussion of this change. llvm-svn: 45410
* Fix a crash on a top-level objc string, patch by Nico WeberChris Lattner2007-12-271-2/+2
| | | | llvm-svn: 45370
* - Use Tok.isObjCAtKeyword instead of ↵Chris Lattner2007-12-272-22/+26
| | | | | | | | | | | | Tok.getIdentifierInfo()->getObjCKeywordID(). The later fails if the token is not an identifier. - Replace tabs with spaces. - Various other cleanups. Patch by Nico Weber! llvm-svn: 45368
* Fix an nice and subtle parser bug reported by Nico Weber.Chris Lattner2007-12-181-2/+2
| | | | llvm-svn: 45149
* Add __private_extern__ keyword and recognize it. Added a FIXME to indicate ↵Steve Naroff2007-12-181-0/+5
| | | | | | there is still work to do. llvm-svn: 45135
* use new interface.Chris Lattner2007-12-131-1/+1
| | | | llvm-svn: 44978
* Concatenation of objc strings.Fariborz Jahanian2007-12-121-1/+1
| | | | llvm-svn: 44964
* TargetInfo no longer includes a reference to SourceManager.Ted Kremenek2007-12-121-1/+1
| | | | | | | | | | | | | | | Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. llvm-svn: 44957
* move function to a more logical location, add its grammar productions.Chris Lattner2007-12-122-37/+38
| | | | llvm-svn: 44923
* remove todoChris Lattner2007-12-121-1/+0
| | | | llvm-svn: 44922
* simplify some code.Chris Lattner2007-12-121-43/+25
| | | | llvm-svn: 44913
* Add ObjC parser support for concatenated ObjC strings. Note thatChris Lattner2007-12-121-7/+35
| | | | | | | | 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. llvm-svn: 44898
* Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek2007-12-113-11/+12
| | | | | | | | | | | | | | | | | | SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. llvm-svn: 44878
* Fixed a parsing bug whereby @optional/@required keyword is not followed by Fariborz Jahanian2007-12-111-0/+3
| | | | | | a method declaration. llvm-svn: 44870
* Patch to implement "Protocol" as a built-in type declared asFariborz Jahanian2007-12-071-0/+3
| | | | | | "@class Protocol;" llvm-svn: 44670
* Make sure Parser::ParseObjCSelectorExpression() handles unary selectors ↵Steve Naroff2007-12-051-4/+5
| | | | | | (with no arguments) properly. llvm-svn: 44636
* improve VC++ compatibility, patch by Cédric Venet.Chris Lattner2007-12-021-10/+10
| | | | llvm-svn: 44496
* Test commitSeo Sanghyeon2007-12-011-1/+1
| | | | llvm-svn: 44488
* Yesterday, I simplified how we stream top-level decls.Steve Naroff2007-11-291-3/+5
| | | | | | | After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-). TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately... llvm-svn: 44445
* Several fixes/simplifications surrounding how we stream top-level decl AST's.Steve Naroff2007-11-281-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following code... typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR; struct Y { int A; }; struct X { int A; } D; struct X E, F; ...now produces the following output... > ../../Debug/bin/clang xx.c -ast-print Read top-level tag decl: 'cssm_data' typedef struct cssm_data CSSM_DATA; typedef struct cssm_data *CSSM_DATA_PTR; Read top-level tag decl: 'Y' Read top-level tag decl: 'X' Read top-level variable decl: 'D' Read top-level variable decl: 'E' Read top-level variable decl: 'F' ...which is much more accurate than the previous -ast-print output... typedef struct cssm_data CSSM_DATA; typedef struct cssm_data CSSM_DATA; Read top-level variable decl: 'D' Read top-level variable decl: 'E' Read top-level variable decl: 'E' llvm-svn: 44421
* Keep track of whether the asm is volatile or not.Anders Carlsson2007-11-231-2/+2
| | | | llvm-svn: 44297
* Store output and input operands as well as clobber information in the ↵Anders Carlsson2007-11-221-14/+44
| | | | | | AsmStmt. Ted, could you please review the serialization/deserialization code? llvm-svn: 44266
* GCC fails if there is a trailing colon but no clobbers.Anders Carlsson2007-11-211-7/+5
| | | | llvm-svn: 44265
* Store inline asm code in the AST.Anders Carlsson2007-11-202-6/+10
| | | | llvm-svn: 44255
* Finish up variadic methods/messages.Steve Naroff2007-11-151-5/+11
| | | | llvm-svn: 44172
* Implement support for variadic methods (work in progress).Steve Naroff2007-11-151-2/+6
| | | | llvm-svn: 44171
* Handle "bool" in all places that touch _Bool. Chris Lattner2007-11-152-0/+3
| | | | | | | | This fixes code like "if((bool)x) {}" for example. Patch by Nate Begeman. llvm-svn: 44159
* Rewrite method definition bodies. Also renamed a method to distinguish ↵Steve Naroff2007-11-132-3/+4
| | | | | | between method declarations and definitions. llvm-svn: 44080
* Give AST-walk passes a way to access DeclSpec attributes on functions andNate Begeman2007-11-131-1/+5
| | | | | | variables. llvm-svn: 44073
* Parse "sizeof(arr)[0]" as a sizeof of an expr if arr Chris Lattner2007-11-131-2/+6
| | | | | | is an expression. llvm-svn: 44065
* 'super' nailed.Fariborz Jahanian2007-11-121-2/+4
| | | | llvm-svn: 44025
* Add an error diagnostic to Parse::ParseObjCMessageExpression().Steve Naroff2007-11-121-0/+1
| | | | | | | | | | | | | | | | | | 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(). llvm-svn: 44022
* Replace 2 method definition actions (ActOnFunctionDefBody, ↵Steve Naroff2007-11-112-2/+2
| | | | | | ActOnMethodDefBody) with 1 method definition action (ActOnFinishFunctionBody). I can't think of any reason that we would need two action hooks. llvm-svn: 44000
* Replace 3 method definition functions (ObjcParseMethodDefinition, ↵Steve Naroff2007-11-112-65/+31
| | | | | | | | ParseObjCInstanceMethodDefinition, ParseObjCClassMethodDefinition) with 1 method definition function (ParseObjCMethodDefinition). Less code/confusion. llvm-svn: 43999
* This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() ↵Steve Naroff2007-11-112-17/+3
| | | | | | | | | | | | | | | 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. llvm-svn: 43995
* pretty priting for method definitions.Fariborz Jahanian2007-11-101-5/+6
| | | | llvm-svn: 43986
* Represent method definitions as separate AST nodes. Pretty print will come next.Fariborz Jahanian2007-11-102-16/+26
| | | | llvm-svn: 43979
* Some code clean up in the form of name changes for functions whichFariborz Jahanian2007-11-092-7/+9
| | | | | | process method definitions. llvm-svn: 43967
* Added class context to method declarations. Provide "interface *" typeFariborz Jahanian2007-11-091-4/+5
| | | | | | to 'self' method of instance methods. llvm-svn: 43957
OpenPOWER on IntegriCloud