summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
Commit message (Collapse)AuthorAgeFilesLines
* Add 'this' in the comments of Parser::ParseCastExpression to indicate that ↵Argyrios Kyrtzidis2008-07-161-0/+1
| | | | | | it is handled. llvm-svn: 53665
* Use lowercase of attribute iboutlet to not conflict with the macro IBOutletTed Kremenek2008-07-151-1/+1
| | | | llvm-svn: 53645
* Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific ↵Ted Kremenek2008-07-151-1/+2
| | | | | | attribute that the static analyzer will use to recognize what ivars are IBOutlets. llvm-svn: 53644
* Use of NextToken() makes ParseIdentifierStatement unnecessary.Argyrios Kyrtzidis2008-07-121-87/+7
| | | | | | Simplify the parser by removing Parser::ParseIdentifierStatement. llvm-svn: 53520
* Simplify the parser a bit by looking at the next token without consuming it ↵Argyrios Kyrtzidis2008-07-093-100/+47
| | | | | | | | | (by Preprocessor::LookNext): -Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier. -Separate ParseLabeledStatement from ParseIdentifierStatement. llvm-svn: 53376
* Add Sema support for C++ classes.Argyrios Kyrtzidis2008-07-011-6/+8
| | | | llvm-svn: 52956
* Handle unnamed bitfields when parsing C++ classes.Argyrios Kyrtzidis2008-06-281-26/+30
| | | | llvm-svn: 52855
* Make Declarator::getDeclSpec() return a const reference to avoidChris Lattner2008-06-261-1/+1
| | | | | | cases where mutation can introduce bugs. Propagate around 'const'. llvm-svn: 52772
* The only caller of this knows that the current token is l_brace, so this can ↵Argyrios Kyrtzidis2008-06-241-12/+1
| | | | | | be an assert; suggestion by Chris. llvm-svn: 52696
* Add parsing support for C++ classes.Argyrios Kyrtzidis2008-06-245-1/+445
| | | | | | | Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place. Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass. llvm-svn: 52694
* add parser and sema support for the funny ObjC '@defs' thing.Chris Lattner2008-06-211-13/+34
| | | | | | Patch by David Chisnall! llvm-svn: 52586
* K&R-style functions not allowed in C++.Argyrios Kyrtzidis2008-06-211-2/+3
| | | | llvm-svn: 52575
* One more test checkin.Mike Stump2008-06-191-1/+1
| | | | | | Remove an extra space at the end of a line. llvm-svn: 52504
* Test commit to see if new account works.Mike Stump2008-06-191-60/+60
| | | | | | | I choose to remove extraneous whitespace at end of lines as a semantic nop for the test. llvm-svn: 52503
* implement the alias attirbute (in both Sema and Codegen)Nuno Lopes2008-06-081-0/+3
| | | | llvm-svn: 52092
* 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
* Support "<p>" as a short-hand for "id<p>". Here's a comment from GCC (the ↵Steve Naroff2008-06-051-1/+21
| | | | | | | | | | only documentation I could find on it). /* Make "<SomeProtocol>" equivalent to "id <SomeProtocol>" - nisse@lysator.liu.se. */ This commit adds the parser magic. The type associated with <p> is still incorrect. Will discuss with Chris. llvm-svn: 51972
* 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
* handle the full assignment-expression grammar when using an Chris Lattner2008-06-022-5/+25
| | | | | | objc message send in an initializer expression. llvm-svn: 51882
* Fix a couple crashes on invalid input.Chris Lattner2008-05-271-1/+2
| | | | llvm-svn: 51622
* Implementation of gcc mode attribute; this is significant because Eli Friedman2008-05-271-0/+1
| | | | | | | | | | it fixes PR2204. Not too much to say about the implementation; it works in a similar way to the vector size attribute. At some point, we need to modify the targets to provide information about the appropriate types. llvm-svn: 51577
* 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
* Fix the scope of K&R-style argument declarations so that they don't Eli Friedman2008-05-201-1/+1
| | | | | | | | | extend beyond the end of the function. I'm not completely sure this is the right way to fix this bug, so someone familiar with the parser should double-check. llvm-svn: 51311
* -Implement proper name lookup for namespaces.Argyrios Kyrtzidis2008-05-091-1/+2
| | | | | | | -identifierResolver exposes an iterator interface to get all decls through the scope chain. -The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier. llvm-svn: 50923
* Don't call into objc front-end when not parsing objc code. This avoidsChris Lattner2008-05-091-1/+3
| | | | | | crashes because objc types aren't set up right. llvm-svn: 50884
* 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
* Convert CRLF to LF.Argyrios Kyrtzidis2008-05-011-3/+3
| | | | llvm-svn: 50542
* Default visbility for instance variables is protected.Fariborz Jahanian2008-04-291-1/+1
| | | | | | Patch by Emerson Murhpy-Hill. llvm-svn: 50452
* Call ExitScope before ActOnFinishNamespaceDef.Argyrios Kyrtzidis2008-04-271-2/+3
| | | | | | This is the same for functions and it's preferable to have the namespace as DeclContext during ActOnPopScope. llvm-svn: 50322
* Parsing of namespaces:Argyrios Kyrtzidis2008-04-271-6/+14
| | | | | | | | | -NamespaceDecl for the AST -Checks for name clashes between namespaces and tag/normal declarations. This commit doesn't implement proper name lookup for namespaces. llvm-svn: 50321
* initial support for recognizing __transparent_union__ attributesNuno Lopes2008-04-251-0/+3
| | | | | | comments on the ML will follow llvm-svn: 50262
* 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
* Two improvements to initializer parsing:Chris Lattner2008-04-201-5/+19
| | | | | | | | 1. If we hit a semantic error, try harder to recover to emit diagnostics for later initializer errors (PR2241). 2. Don't leak parsed initializers on an error. llvm-svn: 49998
* OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.Nate Begeman2008-04-181-1/+1
| | | | llvm-svn: 49942
* 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
* Make Parser::getAccessSpecifierIfPresent const, since it does not modify the ↵Douglas Gregor2008-04-141-2/+2
| | | | | | state llvm-svn: 49629
* This patch adds very basic support for parsing and type-checking classDouglas Gregor2008-04-132-39/+234
| | | | | | | | | | | inheritance in C++. It'll parse the base-specifier list, e.g., class D : public B1, virtual public B2 { }; and do some of the simpler semantic checks (B1 and B2 are classes; they aren't unions or incomplete types, etc). llvm-svn: 49623
* This patch is just the easy part of the class names patch, whichChris Lattner2008-04-132-5/+12
| | | | | | | | | | | | | | | | allows the parsing of "class" in addition to "struct" and "union" to declare a record. So this patch allows: class C { }; class C c1; But it does not contain the lookup bits, so this won't work yet: C c2; Patch by Doug Gregor! llvm-svn: 49613
* Default argument cleanups and minor improvements, patch byChris Lattner2008-04-121-7/+0
| | | | | | Doug Gregor! llvm-svn: 49598
* 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-102-8/+6
| | | | | | | | 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
* reduce the amount of 'C++ magic' this code depends on :)Chris Lattner2008-04-101-2/+2
| | | | llvm-svn: 49489
* refactor Parser::ParseStructDeclaration to return a vector of uninterpreted Chris Lattner2008-04-102-31/+66
| | | | | | | | | | | | | | 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
* Simplify lifetime of location object.Chris Lattner2008-04-101-6/+6
| | | | llvm-svn: 49467
* Several improvements from Doug Gregor related to defaultChris Lattner2008-04-101-1/+2
| | | | | | argument handling. I'll fix up the c89 (void) thing next. llvm-svn: 49459
OpenPOWER on IntegriCloud