summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked aDouglas Gregor2010-10-081-1/+2
| | | | | | bit by me). llvm-svn: 116122
* Implement the C++0x "trailing return type" feature, e.g.,Douglas Gregor2010-10-011-0/+19
| | | | | | | | | | auto f(int) -> int from Daniel Wallin! (With a few minor bug fixes from me). llvm-svn: 115322
* Allow the use of C++0x deleted functions as an extension in C++98.Anders Carlsson2010-09-241-1/+3
| | | | llvm-svn: 114762
* Eliminate the comma locations from all of the Sema routines that dealDouglas Gregor2010-09-091-2/+1
| | | | | | | | with comma-separated lists. We never actually used the comma locations, nor did we store them in the AST, but we did manage to waste time during template instantiation to produce fake locations. llvm-svn: 113495
* Improve recovery when there is a stray ']' or ')' before the ';' atDouglas Gregor2010-09-071-3/+4
| | | | | | the end of a statement. Fixes <rdar://problem/6896493>. llvm-svn: 113202
* Improve recovery when a comma is missing between enumerators in anDouglas Gregor2010-09-071-5/+5
| | | | | | enumeration definition. Fixes <rdar://problem/7159693>. llvm-svn: 113201
* Improve diagnostic and recovery when missing a comma between base orDouglas Gregor2010-09-071-0/+6
| | | | | | member initializers in a C++ constructor. Fixes <rdar://problem/7796492>. llvm-svn: 113199
* Enable inline namespaces in C++03 as an extension.Sebastian Redl2010-08-311-0/+4
| | | | llvm-svn: 112566
* Basic code completion support for the base and member initializers inDouglas Gregor2010-08-281-6/+13
| | | | | | a constructor. llvm-svn: 112330
* Parser support for inline namespacesSebastian Redl2010-08-271-7/+14
| | | | llvm-svn: 112320
* One who seeks knowledge learns something new every day.John McCall2010-08-261-27/+25
| | | | | | | | | One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. llvm-svn: 112244
* Parse all kinds of declarations as part of a linkage-specification,Douglas Gregor2010-08-241-1/+1
| | | | | | from Francois Pichet! Fixes PR7754. llvm-svn: 111912
* OwningExprResult -> ExprResult. This patch brought to you byJohn McCall2010-08-241-8/+8
| | | | | | | M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result llvm-svn: 111903
* Abstract out passing around types and kill off ActionBase.John McCall2010-08-241-33/+31
| | | | llvm-svn: 111901
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-2/+3
| | | | llvm-svn: 111863
* Push DeclGroupRefs and TemplateNames in an opaque but type-safe wayJohn McCall2010-08-231-3/+3
| | | | | | through the parser. llvm-svn: 111800
* Sundry incremental steps towards killing off Action.John McCall2010-08-231-4/+4
| | | | llvm-svn: 111795
* DeclPtrTy -> Decl *John McCall2010-08-211-35/+35
| | | | llvm-svn: 111733
* Another step in the process of making the parser depend on Sema:John McCall2010-08-201-3/+3
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* -Make TokenID of IdentifierInfo read-only, remove setTokenID().Argyrios Kyrtzidis2010-08-111-2/+2
| | | | | | | | -There are 2 instances that change the TokenID for GNU libstdc++ 4.2 compatibility. To handler those cases introduce a RevertedTokenID bitfield, RevertTokenIDToIdentifier() and hasRevertedTokenIDToIdentifier() methods. Store the bitfield in PCH. llvm-svn: 110868
* Allow multiple __declspec attributes after a class-key.John McCall2010-08-051-1/+1
| | | | | | Patch by Francois Pichet! llvm-svn: 110344
* Fixed typedef inside extern "C".Abramo Bagnara2010-07-301-0/+1
| | | | llvm-svn: 109865
* Improve error recovery when presented with an ill-formed template-idJohn McCall2010-07-301-5/+9
| | | | | | | | (e.g. due to a broken template argument) following template parameters. Fixes rdar://problem/8254267 llvm-svn: 109853
* Add source location information to C++ base specifiers.Nick Lewycky2010-07-261-3/+14
| | | | llvm-svn: 109396
* Treat template parameters as part of the declaration-specifiers for theJohn McCall2010-07-161-4/+7
| | | | | | | | purpose of access control. Fixes PR7644. I can't actually find anything directly justifying this, but it seems obvious. llvm-svn: 108521
* Move the "current scope" state from the Parser into Action. ThisDouglas Gregor2010-07-021-37/+37
| | | | | | | | | | | | | | allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration that is not directly driven by the parser (e.g., due to template instantiatio or lazy declaration of a member), we can find the Scope associated with a DeclContext, if that DeclContext is still in the process of being parsed. Use this to make the implicit declaration of special member functions in a C++ class more "scope-less", rather than using the NULL Scope hack. llvm-svn: 107491
* Partial fix for PR7267 based on comments by John McCall on an earlier patch.Chandler Carruth2010-06-281-0/+22
| | | | | | | | | | | | | | | | | | This is more targeted, as it simply provides toggle actions for the parser to turn access checking on and off. We then use these to suppress access checking only while we parse the template-id (included scope specifier) of an explicit instantiation and explicit specialization of a class template. The specialization behavior is an extension, as it seems likely a defect that the standard did not exempt them as it does explicit instantiations. This allows the very common practice of specializing trait classes to work for private, internal types. This doesn't address instantiating or specializing function templates, although those apparently already partially work. The naming and style for the Action layer isn't my favorite, comments and suggestions would be appreciated there. llvm-svn: 106993
* When semantic analysis fail to introduce a class or class template,Douglas Gregor2010-06-211-30/+35
| | | | | | | | just skip over the body of the class or class template: it's a semantic disaster that's likely to cause invariants to break. Fixes part of <rdar://problem/8104754>. llvm-svn: 106496
* When parsing cached C++ method declarations/definitions, save theDouglas Gregor2010-06-161-0/+2
| | | | | | | | "previous token" location at the end of the class definition. This eliminates a badly-placed error + Fix-It when the ';' following a class definition is missing. Fixes <rdar://problem/8066414>. llvm-svn: 106175
* Make the "extra ';' inside a struct or union" diagnostic moreDouglas Gregor2010-06-161-0/+1
| | | | | | precise. Fixes PR7336. llvm-svn: 106170
* Allow an asm label specifier on C++ methods, like GCC does.Chris Lattner2010-06-131-2/+11
| | | | | | Patch by David Majnemer! llvm-svn: 105909
* Added AccessSpecDecl node.Abramo Bagnara2010-06-051-1/+6
| | | | llvm-svn: 105525
* Don't try to parse class template specializations in C. It can onlyDouglas Gregor2010-05-301-3/+1
| | | | | | lead to heartache. Fixes <rdar://problem/8044088>. llvm-svn: 105178
* Don't just skip over the entire tag definition if the parser action didn'tJohn McCall2010-05-281-10/+8
| | | | | | | give us a decl back. Makes -cc1 -parse-noop handle a substantially larger amount of the C++ grammar. llvm-svn: 104940
* Improve code completion in failure cases in two ways:Douglas Gregor2010-05-251-5/+5
| | | | | | | | | | | 1) Suppress diagnostics as soon as we form the code-completion token, so we don't get any error/warning spew from the early end-of-file. 2) If we consume a code-completion token when we weren't expecting one, go into a code-completion recovery path that produces the best results it can based on the context that the parser is in. llvm-svn: 104585
* Propagate access specifiers to anonymous union members nested within classes.John McCall2010-05-211-1/+1
| | | | | | Fixes <rdar://problem/7987650>. llvm-svn: 104376
* mutable is a storage class that can follow a class/struct/union definition. ↵Douglas Gregor2010-05-171-0/+1
| | | | | | Fixes PR7153 llvm-svn: 103954
* Namespaces can only be defined at global or namespace scope. Fixes PR6596.Douglas Gregor2010-05-141-0/+8
| | | | llvm-svn: 103767
* Replace a char*/size pair with stringref.Benjamin Kramer2010-05-031-1/+1
| | | | llvm-svn: 102902
* Parse friend template ids as types instead of ending up inJohn McCall2010-04-141-4/+8
| | | | | | | ActOnClassTemplateSpecialization and being very confused. Fixes PR6514 (for non-templated-scope friends). llvm-svn: 101198
* Make CXXScopeSpec invalid when incomplete, and propagate that into anyJeffrey Yasskin2010-04-081-1/+1
| | | | | | | Declarator that depends on it. This fixes several redundant errors and bad recoveries. llvm-svn: 100779
* Reinstate my CodeModificationHint -> FixItHint renaming patch, withoutDouglas Gregor2010-03-311-3/+3
| | | | | | the C-only "optimization". llvm-svn: 100022
* Revert r100008, which inexplicably breaks the clang-i686-darwin10 builderDouglas Gregor2010-03-311-3/+3
| | | | llvm-svn: 100018
* Rename CodeModificationHint to FixItHint, since we've been using theDouglas Gregor2010-03-311-3/+3
| | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
* Support __attribute__((packed)) (along with other attributes) at theDouglas Gregor2010-03-291-2/+3
| | | | | | end of a struct/class/union in C++, from Justin Bogner! llvm-svn: 99811
* Clean up after ourselves when there's an error parsing the base clause.John McCall2010-03-171-2/+5
| | | | | | Fixes the crash-on-invalid in PR6629. llvm-svn: 98698
* Audit all Preprocessor::getSpelling() callers, improving failureDouglas Gregor2010-03-161-1/+4
| | | | | | recovery for those that need it. llvm-svn: 98689
* Use SmallString instead of SmallVectorKovarththanan Rajaratnam2010-03-131-47/+47
| | | | llvm-svn: 98436
* Fix an amusing typo that completely the re-introduction of parametersDouglas Gregor2010-03-021-1/+1
| | | | | | | | | | | for the purposes of parsing default arguments. In effect, we would re-introduce the parameter with a default argument N times (where N is the number of parameters preceding the parameter with a default argument). This showed up when a defaulted parameter of a member function of a local class shadowed a parameter of the enclosing function. Fixes PR6383. llvm-svn: 97534
* Add commentDouglas Gregor2010-03-021-1/+2
| | | | llvm-svn: 97528
OpenPOWER on IntegriCloud