summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* fix a crash on unnamed properties like:Chris Lattner2008-10-201-7/+13
| | | | | | @property (readonly) int : 4; llvm-svn: 57805
* simplify some code by using ExpectAndConsume. When an errorChris Lattner2008-10-201-9/+6
| | | | | | | occurs, skip to an @ or ; instead of to a } or ;. Properties don't necessarily live in {}'s. llvm-svn: 57804
* refactor a bunch of code:Chris Lattner2008-10-201-44/+27
| | | | | | | | | | Check for @end in ParseObjCInterfaceDeclList instead of in each caller Handle @required and @optional with the same code Add some fixmes about some apparently objc2 code that is being accepted in objc1. llvm-svn: 57803
* fix some minor error recovery bugs in ParseObjCInterfaceDeclListChris Lattner2008-10-201-12/+27
| | | | | | | | | | | where it would reject @required in non-protocols, but then go ahead and tag methods with required anyway. Instead, if we see this in something other than a protocol, just ignore the request. Also, improve error recovery a bit when we see something bogus inside an interface. llvm-svn: 57798
* restructure the body of the ParseObjCInterfaceDeclList loopChris Lattner2008-10-201-67/+77
| | | | | | to make it easier to understand. No functionality change. llvm-svn: 57797
* Pass postfix attributes to ActOnFields.Daniel Dunbar2008-10-031-1/+1
| | | | llvm-svn: 56992
* Enter a new scope for a @try block.Ted Kremenek2008-09-261-0/+2
| | | | llvm-svn: 56668
* Parser support for prefix __attribute__ on @protocol.Daniel Dunbar2008-09-261-2/+3
| | | | llvm-svn: 56642
* Have @finally introduce a new scope.Ted Kremenek2008-09-261-0/+3
| | | | | | Fixes: <rdar://problem/6248119> @finally doesn't introduce a new scope llvm-svn: 56629
* Fix rdar://6222856: the receiver of a message expr is anChris Lattner2008-09-191-1/+1
| | | | | | | arbitrary expr, not just a assign expr. The grammar comment was right, the code was just wrong. llvm-svn: 56353
* Synthesize property setter method as we do for getter.Daniel Dunbar2008-08-261-4/+22
| | | | | | | - Also, fix Parser to construct proper SetterName selector (should be lifted out of parser though). llvm-svn: 55352
* Reserved C++ words are valid selectors in Objective-C++Anders Carlsson2008-08-231-35/+64
| | | | llvm-svn: 55253
* we already have a handle on the 'in' keyword, don't bother getting two.Chris Lattner2008-08-231-21/+21
| | | | llvm-svn: 55217
* Fix a FIXME by not creating an invalid AST on erroneous input. Also Chris Lattner2008-08-231-11/+23
| | | | | | | make diagnostic output in some other malformed cases significantly more useful. This fixes PR2708 llvm-svn: 55215
* Move AsmLabel into Declarator instead of just a parameter toDaniel Dunbar2008-08-051-1/+1
| | | | | | ActOnDeclarator. llvm-svn: 54353
* Fix rdar://6124613 a crash on invalid code.Chris Lattner2008-08-051-45/+54
| | | | llvm-svn: 54340
* Add more Parser/Sema support for GCC asm-label extension.Daniel Dunbar2008-08-051-1/+1
| | | | | | | | | | | | | - ActOnDeclarator now takes an additional parameter which is the AsmLabel if used. Its unfortunate that this bubbles up this high, but we cannot just lump it in as an attribute without mistakenly *accepting* it as an attribute. - The actual asm-label itself is, however, encoded as an AsmLabelAttr on the FunctionDecl. - Slightly improved parser error recovery on malformed asm-labels. - CodeGen support still missing... llvm-svn: 54339
* Pull protocol resolution of out ActOnStartClassInterface, this is also the Chris Lattner2008-07-261-44/+11
| | | | | | last client of the old ParseObjCProtocolReferences, so it also removes it. llvm-svn: 54094
* refactor protocol resolution out of ActOnStartCategoryInterfaceChris Lattner2008-07-261-7/+8
| | | | llvm-svn: 54093
* pull protocol resolution out into ActOnStartProtocolInterface.Chris Lattner2008-07-261-7/+49
| | | | | | | This temporarily duplicates ParseObjCProtocolReferences, but it will be removed in the future. llvm-svn: 54092
* gcc requires a semicolon at the end of an interface, unlike its extension ↵Chris Lattner2008-07-251-3/+0
| | | | | | | | for structs. rdar://6095245. llvm-svn: 54044
* Move fix in r54013 from the parser to sema.Steve Naroff2008-07-251-6/+3
| | | | llvm-svn: 54032
* Fix Parser::ParseObjCMethodDefinition(). Only call the actions module for ↵Steve Naroff2008-07-251-3/+6
| | | | | | valid MDecl's. llvm-svn: 54013
* minor cleanup to the actions interface to pass around SmallVectorImpl insteadChris Lattner2008-07-211-17/+24
| | | | | | | | | | | | | | | | | | | | | | of a specific smallvector size. Fix protocol lists to pass down proper location info, so we get diagnostics like this: t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ instead of this: t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation> llvm-svn: 53883
* Initial work on additional memory collection for ObjC AST objects. We nowTed Kremenek2008-06-061-3/+6
| | | | | | | | have Destroy methods of ObjcMethodDecl and ObjCInterfaceDecl which recursively destroy their owned Decls and Stmts. There are a few cases where it is not clear what to do (FIXMEs included in the patch). llvm-svn: 52050
* Parser::ParseObjCSynchronizedStmt() needs to Enter/Exit a decl scope.Steve Naroff2008-06-041-0/+6
| | | | llvm-svn: 51963
* Fix parser bug/FIXME with @catch.Steve Naroff2008-06-031-7/+11
| | | | | | <rdar://problem/5980846> clang on xcode: error: declarator requires an identifier (for @catch) llvm-svn: 51895
* Make sure the source location for @property points the the @-sign (not the ↵Steve Naroff2008-05-221-1/+1
| | | | | | | | decl spec). Also added a FIXME related to how we represent @properties in the ObjCInterfaceDecl AST. llvm-svn: 51450
* This patch introduces declaration of getter methods for ObjC2'sFariborz Jahanian2008-05-071-2/+7
| | | | | | | properties. Couple of property tests will fail with this patch. Will fix them next. llvm-svn: 50818
* Patch to refactor setter/getter names of property attributes into SelectorFariborz Jahanian2008-05-061-0/+5
| | | | | | | (was IdentifierInfo * before). This will make method declartations whole lot easier. llvm-svn: 50747
* percolate @optional/@required protocols down to ASTs forFariborz Jahanian2008-05-051-1/+2
| | | | | | properties declared in the protocol. llvm-svn: 50662
* Default visbility for instance variables is protected.Fariborz Jahanian2008-04-291-1/+1
| | | | | | Patch by Emerson Murhpy-Hill. llvm-svn: 50452
* Support for @dynamic AST build.Fariborz Jahanian2008-04-211-1/+5
| | | | | | | More property semantics checking. First test case for ObjC2's property implementation. llvm-svn: 50057
* Initial work for property implementation declarations.Fariborz Jahanian2008-04-181-2/+7
| | | | | | | Mostly semantic checking in this patch. This is on going and incomplete. llvm-svn: 49882
* New AST representation for each objc2's property declaration.Fariborz Jahanian2008-04-141-34/+26
| | | | llvm-svn: 49699
* AST generation for objc2's property declarations.Fariborz Jahanian2008-04-111-14/+3
| | | | llvm-svn: 49565
* Minor changes per Chris L's review.Fariborz Jahanian2008-04-111-1/+2
| | | | llvm-svn: 49539
* Patch for:Fariborz Jahanian2008-04-101-7/+5
| | | | | | | | 1) objc ivar processing is split out of ActOnField into its own ActOnIvar method. 2) the new objc ivar action takes visibility info directly, eliminating AllVisibilities in ParseObjCClassInstanceVariables. llvm-svn: 49506
* refactor Parser::ParseStructDeclaration to return a vector of uninterpreted Chris Lattner2008-04-101-11/+36
| | | | | | | | | | | | | | declarators. This allows the clients (C structs, objc classes, objc properties, [future] C++ classes) etc, to do custom processing before invoking an action. This has two benefits in the short term: 1) objc ivar processing should be split out of ActOnField into its own ActOn method. 2) the new objc ivar action can take visibility info directly, eliminating AllVisibilities in ParseObjCClassInstanceVariables. 3) objc properties can pass their own special sauce down to sema as well. llvm-svn: 49468
* move sorting of qualifying protocols from the parser intoChris Lattner2008-04-071-15/+1
| | | | | | | | sema. This allows clients of the parser to have the unmolested list if desired, and guarantees that noone can create an ObjCQualifiedInterfaceType with an unsorted list. llvm-svn: 49310
* clean up property memory allocation to move it into the ast classesChris Lattner2008-03-171-2/+2
| | | | | | like the rest of the classes. llvm-svn: 48434
* minor cleanups, make getNumInstanceMethods always return unsigned.Chris Lattner2008-03-161-2/+1
| | | | llvm-svn: 48423
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+1578
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. llvm-svn: 48402
OpenPOWER on IntegriCloud