summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Set the SourceRange ending of DeclSpec, when Parser::ParseTypeofSpecifier ↵Argyrios Kyrtzidis2008-08-161-0/+1
| | | | | | finishes. llvm-svn: 54840
* More #include cleaningDaniel Dunbar2008-08-111-0/+1
| | | | | | | - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into implementation .cpp llvm-svn: 54626
* Implement support for the 'wchar_t' C++ type.Argyrios Kyrtzidis2008-08-091-0/+6
| | | | llvm-svn: 54585
* Move AsmLabel into Declarator instead of just a parameter toDaniel Dunbar2008-08-051-4/+4
| | | | | | ActOnDeclarator. llvm-svn: 54353
* Add more Parser/Sema support for GCC asm-label extension.Daniel Dunbar2008-08-051-5/+11
| | | | | | | | | | | | | - 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
* Wherever a type is used/returned from the Action module, use TypeTy instead ↵Argyrios Kyrtzidis2008-08-011-1/+1
| | | | | | | | of DeclTy or void. No functionality change. llvm-svn: 54265
* pull protocol resolution out into ActOnStartProtocolInterface.Chris Lattner2008-07-261-11/+2
| | | | | | | 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
* minor cleanup to the actions interface to pass around SmallVectorImpl insteadChris Lattner2008-07-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | 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
* add parser and sema support for the funny ObjC '@defs' thing.Chris Lattner2008-06-211-13/+34
| | | | | | Patch by David Chisnall! llvm-svn: 52586
* 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
* -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
* This patch adds very basic support for parsing and type-checking classDouglas Gregor2008-04-131-38/+2
| | | | | | | | | | | 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-131-5/+11
| | | | | | | | | | | | | | | | 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
* Patch for:Fariborz Jahanian2008-04-101-1/+1
| | | | | | | | 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-101-20/+30
| | | | | | | | | | | | | | 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
* Add support for C++ default arguments, and rework Parse-Sema Chris Lattner2008-04-081-18/+34
| | | | | | | | interaction for function parameters, fixing PR2046. Patch by Doug Gregor! llvm-svn: 49369
* move a semantic check out of the parser into sema.Chris Lattner2008-04-061-13/+0
| | | | llvm-svn: 49273
* now that identifier list parsing is split out, simplify handling ofChris Lattner2008-04-061-111/+102
| | | | | | normal typed argument lists. llvm-svn: 49272
* reject 'int test(x, x) int x; {}'Chris Lattner2008-04-061-0/+1
| | | | llvm-svn: 49271
* reject 'typedef int y; int test(x, y)'.Chris Lattner2008-04-061-1/+5
| | | | llvm-svn: 49270
* simplify Parser::ParseFunctionDeclaratorIdentifierListChris Lattner2008-04-061-24/+15
| | | | llvm-svn: 49269
* split parsing of identifier lists in function declarators out intoChris Lattner2008-04-061-48/+74
| | | | | | their own method. llvm-svn: 49268
* split code for handling grouping parens in declarators from code thatChris Lattner2008-04-061-54/+64
| | | | | | handles function argument parens in declarators. llvm-svn: 49265
* another minor simplificationChris Lattner2008-04-061-3/+1
| | | | llvm-svn: 49264
* Use token lookahead to simplify some code that is rarely executed.Chris Lattner2008-04-061-14/+10
| | | | | | | Since it is rare, the cost is not significant and we enjoy the simplification. llvm-svn: 49263
* Fix handling of implicit int, resolving PR2012 and reverting (andChris Lattner2008-04-051-20/+14
| | | | | | subsuming) my patch for PR1999. llvm-svn: 49251
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+1540
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