summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
Commit message (Collapse)AuthorAgeFilesLines
* Add comments about C++ clause 3.3.2p4 that mentions that the condition ↵Argyrios Kyrtzidis2008-09-111-0/+16
| | | | | | declaration should be local to an if/switch/while/for statement. llvm-svn: 56134
* Fix do-while scoping in C++.Argyrios Kyrtzidis2008-09-111-1/+7
| | | | llvm-svn: 56095
* Revert r56078, getLang().C99 being true in C++ is a bug that will be fixed.Argyrios Kyrtzidis2008-09-111-12/+91
| | | | llvm-svn: 56090
* Fold Parser::ParseTag into Parser::ParseEnumSpecifier, as suggested in this ↵Argyrios Kyrtzidis2008-09-111-48/+39
| | | | | | | | post: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-September/002721.html llvm-svn: 56081
* -getLang().C99 is true in C++ too, remove the use of the C99orCXX variable.Argyrios Kyrtzidis2008-09-101-91/+12
| | | | | | | | -Scoping in C99 works good for C++ too, remove the C++-specific comments. If someone thinks that the C++-specific comments are necessary for clarification, let me know and I'll put them back on. llvm-svn: 56078
* Add some C++-specific comments in the parsing methods of if/switch/while/for.Argyrios Kyrtzidis2008-09-101-0/+71
| | | | llvm-svn: 56060
* Implement parser support for the 'condition' part of C++ ↵Argyrios Kyrtzidis2008-09-092-23/+116
| | | | | | | | selection-statements and iteration-statements (if/switch/while/for). Add new 'ActOnCXXConditionDeclarationExpr' action, called when the 'condition' is a declaration instead of an expression. llvm-svn: 56007
* Support C++'s declaration-statement.Argyrios Kyrtzidis2008-09-071-1/+2
| | | | llvm-svn: 55888
* Support "typeof unary-expression" (GNU C++ extension).Argyrios Kyrtzidis2008-09-051-4/+22
| | | | llvm-svn: 55833
* Add parser/action support for block literal expressions.Steve Naroff2008-08-281-0/+78
| | | | | | Parser support for blocks is almost complete...just need to add support for the __block() storage class qualifier. llvm-svn: 55495
* Fix Parser::ParseDeclaratorInternal(): add langopts test when recognizing ↵Steve Naroff2008-08-281-2/+2
| | | | | | blocks. llvm-svn: 55468
* First wave of changes to support "blocks" (an extension to C).Steve Naroff2008-08-271-7/+12
| | | | | | This commit adds the declaration syntax (and associated type). llvm-svn: 55417
* 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
* Pass SourceRanges by reference to the various Diag methods.Argyrios Kyrtzidis2008-08-241-1/+1
| | | | llvm-svn: 55284
* Add a Parser::Diag overload that can receive a custom string along with a ↵Argyrios Kyrtzidis2008-08-241-0/+6
| | | | | | SourceRange. llvm-svn: 55283
* Add support for parsing the objc_gc attribute. Tests will come shortly.Anders Carlsson2008-08-231-0/+1
| | | | llvm-svn: 55269
* Reserved C++ words are valid selectors in Objective-C++Anders Carlsson2008-08-231-35/+64
| | | | llvm-svn: 55253
* make sure that ParseAST invokes the action for end of translation unit.Chris Lattner2008-08-231-3/+4
| | | | llvm-svn: 55222
* add action to know about end of translation unit.Chris Lattner2008-08-231-1/+3
| | | | llvm-svn: 55218
* we already have a handle on the 'in' keyword, don't bother getting two.Chris Lattner2008-08-232-22/+21
| | | | llvm-svn: 55217
* minor cleanup, remove finalize method.Chris Lattner2008-08-231-9/+3
| | | | llvm-svn: 55216
* 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
* Add support for C++'s "type-specifier ( expression-list )" expression:Argyrios Kyrtzidis2008-08-222-2/+172
| | | | | | | | | | -The Parser calls a new "ActOnCXXTypeConstructExpr" action. -Sema, depending on the type and expressions number: -If the type is a class, it will treat it as a class constructor. [TODO] -If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node -If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node. llvm-svn: 55177
* Fix a minor crash-on-invalid.Eli Friedman2008-08-201-1/+1
| | | | llvm-svn: 55082
* "Remove the 'else' since the code is fallthrough after it." - suggestion by ↵Argyrios Kyrtzidis2008-08-181-2/+2
| | | | | | Chris. llvm-svn: 54952
* Put (argument)-expression-list parsing in a separate function so that it can ↵Argyrios Kyrtzidis2008-08-161-14/+30
| | | | | | be re-used. llvm-svn: 54851
* C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.Argyrios Kyrtzidis2008-08-161-1/+3
| | | | llvm-svn: 54850
* Move handling of postfix-expression suffixes out of ParseCXXThis and into ↵Argyrios Kyrtzidis2008-08-162-7/+4
| | | | | | | | ParseCastExpression. No functionality change, this follows the convention of how postfix-expressions are handled. llvm-svn: 54849
* Set the SourceRange ending of DeclSpec, when Parser::ParseTypeofSpecifier ↵Argyrios Kyrtzidis2008-08-161-0/+1
| | | | | | finishes. llvm-svn: 54840
* Change Parser & Sema to use interned "super" for comparions.Daniel Dunbar2008-08-141-0/+2
| | | | | | | | | | | | | | - Added as private members for each because it is not clear where to put the common definition. Perhaps the IdentifierInfos all of these "pseudo-keywords" should be collected into one place (this would KnownFunctionIDs and Objective-C property IDs, for example). Remove Token::isNamedIdentifier. - There isn't a good reason to use strcmp when we have interned strings, and there isn't a good reason to encourage clients to do so. llvm-svn: 54794
* More #include cleaningDaniel Dunbar2008-08-111-1/+0
| | | | | | | | | | | - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632
* More #include cleaningDaniel Dunbar2008-08-113-0/+13
| | | | | | | - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into implementation .cpp llvm-svn: 54626
* rename PreDefinedExpr -> PredefinedExprChris Lattner2008-08-101-1/+1
| | | | llvm-svn: 54605
* Implement support for the 'wchar_t' C++ type.Argyrios Kyrtzidis2008-08-092-2/+10
| | | | llvm-svn: 54585
* Passing right brace location to ActOnFinishCXXClassDef is redundant, since ↵Argyrios Kyrtzidis2008-08-091-1/+1
| | | | | | it gets passed to ActOnFinishCXXMemberSpecification too. llvm-svn: 54567
* Move AsmLabel into Declarator instead of just a parameter toDaniel Dunbar2008-08-053-7/+6
| | | | | | ActOnDeclarator. llvm-svn: 54353
* Fix rdar://6124613 a crash on invalid code.Chris Lattner2008-08-052-47/+58
| | | | llvm-svn: 54340
* Add more Parser/Sema support for GCC asm-label extension.Daniel Dunbar2008-08-054-8/+19
| | | | | | | | | | | | | - 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
* Nico Weber:Ted Kremenek2008-08-041-3/+3
| | | | | | "the attached patch fixes some typos, 80 cols violations, etc. in comments." llvm-svn: 54328
* Wherever a type is used/returned from the Action module, use TypeTy instead ↵Argyrios Kyrtzidis2008-08-014-4/+4
| | | | | | | | of DeclTy or void. No functionality change. llvm-svn: 54265
* Support __attribute__(({con,de}structor)) in Parse & SemaDaniel Dunbar2008-07-311-0/+3
| | | | | | | - Including possible priority argument - In other news, the attribute parsing code really needs a cleanup llvm-svn: 54257
* Pull protocol resolution of out ActOnStartClassInterface, this is also the Chris Lattner2008-07-262-49/+19
| | | | | | 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-262-18/+51
| | | | | | | This temporarily duplicates ParseObjCProtocolReferences, but it will be removed in the future. llvm-svn: 54092
* simplify some code.Chris Lattner2008-07-261-2/+2
| | | | llvm-svn: 54091
* < only starts a declspec in objc mode.Chris Lattner2008-07-261-2/+3
| | | | llvm-svn: 54089
* remove fixed fixmeChris Lattner2008-07-261-1/+0
| | | | llvm-svn: 54088
* make DeclSpec manage its own protocol qualifier list memory instead of havingChris Lattner2008-07-261-8/+6
| | | | | | clients allocate the memory and it delete it. llvm-svn: 54087
* Fix hte next wave of problems with protocol qualified ID:Chris Lattner2008-07-261-38/+54
| | | | | | | | 1) reject stuff like "id<foo> short" and "<foo> short". 2) set the declspec range correctly 3) only parse protocol qualifiers when in objc mode. llvm-svn: 54086
* improve handling of the horrible GCC objc extension that treats "<foo>" Chris Lattner2008-07-261-7/+15
| | | | | | | | like "id<foo>". This 1) fixes an infinite loop in the parser on things like "short<foo>" 2) emits a warning about this bogus construct and 3) changes the testcase to be substantially reduced. llvm-svn: 54082
OpenPOWER on IntegriCloud