summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* remove uses of IdentifierInfo::getName()Chris Lattner2008-11-191-2/+1
| | | | llvm-svn: 59603
* remove the last couple obsolete forms of Parser::Diag.Chris Lattner2008-11-181-2/+2
| | | | llvm-svn: 59510
* Change a couple of the Parser::Diag methods to return DiagnosticInfoChris Lattner2008-11-181-22/+20
| | | | | | | | | and let the clients push whatever they want into the DiagnosticInfo instead of hard coding a few forms. Also switch various clients to use Diag(Tok, ...) instead of Diag(Tok.getLocation(), ...) as the canonical form to simplify the code a bit. llvm-svn: 59509
* some minor cleanups to ParseObjCTypeName:Chris Lattner2008-10-221-17/+12
| | | | | | | | | | 1. Remove a bogus assertion, clients other than sema can return a null pointer from actions that result in ParseTypeName returning null. 2. Remove dead RParenLoc variable. 3. Simplify control flow handling error conditions. 4. On a major failure, we should skip until ')' not until '}'. llvm-svn: 57949
* Fix a crasher during error recovery in Parser::ParseObjCTypeName().Steve Naroff2008-10-211-1/+2
| | | | | | Found this while fixing another unrelated radar. llvm-svn: 57904
* eliminate ObjCPropertyAttrs an corresponding enums, just useChris Lattner2008-10-201-9/+9
| | | | | | strcmp when needed. llvm-svn: 57817
* rearrange some code.Chris Lattner2008-10-201-17/+16
| | | | llvm-svn: 57816
* more simplifications to error recovery in ParseObjCPropertyAttributeChris Lattner2008-10-201-28/+18
| | | | llvm-svn: 57815
* move some code around to make it fall through more, no functionality change.Chris Lattner2008-10-201-25/+24
| | | | llvm-svn: 57813
* reject properties completely in objc1 instead of emitting Chris Lattner2008-10-201-7/+15
| | | | | | weird errors about property attributes being unknown. llvm-svn: 57812
* More property attribute recovery improvements. Instead of this:Chris Lattner2008-10-201-16/+13
| | | | | | | | | | | | | | | | | | | | | | crash.m:8:12: error: type name requires a specifier or qualifier @property (readonlyx, getter=isAwesome) int _awesome; ^ crash.m:8:29: error: expected ';' at end of declaration list @property (readonlyx, getter=isAwesome) int _awesome; ^ crash.m:8:39: error: expected identifier or '(' @property (readonlyx, getter=isAwesome) int _awesome; ^ we now get: crash.m:8:12: error: unknown property attribute 'readonlyx' @property (readonlyx, getter=isAwesome) int _awesome; ^ Also, we can eliminate isObjCPropertyAttribute now. llvm-svn: 57811
* significantly simplify and clean up error recovery in Chris Lattner2008-10-201-25/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ParseObjCPropertyAttribute. Before, on this code (where a comma was forgotten): @property (readonly getter=isAwesome) int _awesome; we emitted: crash.m:9:11: error: expected ')' @property (readonly getter=isAwesome) int _awesome; ^ crash.m:9:37: error: type name requires a specifier or qualifier @property (readonly getter=isAwesome) int _awesome; ^ crash.m:9:37: error: expected identifier or '(' crash.m:9:37: error: expected ';' at end of declaration list crash.m:9:1: error: @property requires fields to be named @property (readonly getter=isAwesome) int _awesome; ^ now we emit: crash.m:9:21: error: expected ')' @property (readonly getter=isAwesome) int _awesome; ^ crash.m:9:11: error: to match this '(' @property (readonly getter=isAwesome) int _awesome; ^ llvm-svn: 57809
* 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
OpenPOWER on IntegriCloud