summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert a number of statement parsers to smart pointers.Sebastian Redl2008-12-111-5/+5
| | | | llvm-svn: 60888
* Use a scoped object to manage entry/exit from a parser scope rather than ↵Douglas Gregor2008-12-101-11/+8
| | | | | | explicitly calling EnterScope/ExitScope llvm-svn: 60830
* Modify the move emulation according to the excellent design of Howard ↵Sebastian Redl2008-12-101-19/+21
| | | | | | Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers. llvm-svn: 60809
* Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResultSebastian Redl2008-12-091-16/+17
| | | | llvm-svn: 60791
* Consistently use smart pointers for stmt and expr nodes in parser local ↵Sebastian Redl2008-12-091-62/+57
| | | | | | variables. llvm-svn: 60761
* improve comment.Chris Lattner2008-12-081-1/+1
| | | | llvm-svn: 60718
* Set default property attributes on each property.Fariborz Jahanian2008-11-261-1/+5
| | | | | | | | Implemented anonymous category (also know as continuation class) used to override main class's property attribute. This is work in propgress. llvm-svn: 60114
* Use RAII objects to ensure proper destruction of expression and statement ↵Sebastian Redl2008-11-251-21/+22
| | | | | | AST nodes in the parser in most cases, even on error. llvm-svn: 60057
* Daniel really really likes = instead of += :)Chris Lattner2008-11-201-1/+1
| | | | llvm-svn: 59716
* Rename IdentifierInfo::isName to ::isStr. Use a nifty trickChris Lattner2008-11-201-7/+7
| | | | | | | from Sebastian to enforce that a literal string is passed in, and use this to avoid having to call strlen on it. llvm-svn: 59706
* Fix <rdar://problem/6150376> [sema] crash on invalid message send.Steve Naroff2008-11-191-4/+6
| | | | | | The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic). llvm-svn: 59639
* remove some uses of IdentifierInfo::getName()Chris Lattner2008-11-191-9/+8
| | | | llvm-svn: 59606
* Use smallstring instead of new[]'ing a string. This simplifiesChris Lattner2008-11-191-8/+4
| | | | | | the code and speeds it up. llvm-svn: 59604
* 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
OpenPOWER on IntegriCloud