summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Get rid of the [[final]] C++0x attribute.Anders Carlsson2011-01-231-1/+0
| | | | llvm-svn: 124083
* Accept the C++0x override control keywords as an extension in C++98. This is ↵Anders Carlsson2011-01-221-2/+10
| | | | | | OK since the new syntax is unambiguous and can't be confused with C++98 syntax. If anyone disagrees, please shout! llvm-svn: 124048
* Mark classes as final or explicit. Diagnose when a class marked 'final' is ↵Anders Carlsson2011-01-221-1/+2
| | | | | | used as a base. llvm-svn: 124039
* Parse class-virt-specifier-seqs.Anders Carlsson2011-01-221-11/+69
| | | | llvm-svn: 124036
* More work on ClassVirtSpecifiers.Anders Carlsson2011-01-221-1/+1
| | | | llvm-svn: 124035
* Pass the VirtSpecifiers along to Sema::ActOnCXXMemberDeclarator.Anders Carlsson2011-01-201-1/+1
| | | | llvm-svn: 123878
* Lazily initialize the 'final' and 'override' contextual keywords as ↵Anders Carlsson2011-01-201-0/+6
| | | | | | suggested by Doug. llvm-svn: 123876
* Parse the optional semicolon after a C++ in-class member functionDouglas Gregor2011-01-191-0/+12
| | | | | | | definition, rather than complaining about it. Problem reported by Marshall Clow. llvm-svn: 123835
* Fix warnings found by gcc-4.6, from -Wunused-but-set-variable andJeffrey Yasskin2011-01-181-2/+1
| | | | | | -Wint-to-pointer-cast. llvm-svn: 123719
* Remove dead code.Anders Carlsson2011-01-171-5/+0
| | | | llvm-svn: 123612
* Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.Anders Carlsson2011-01-171-8/+31
| | | | | | | Enforce C++[class.mem]p8: A virt-specifier-seq shall contain at most one of each virt-specifier. llvm-svn: 123611
* Begin work on supporting "N3206: Override control: Eliminating Attributes", fromAnders Carlsson2011-01-161-1/+45
| | | | | | | | | http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm This lands support for parsing virt-specifier-seq after member functions, including the contextual keywords 'final', and 'override'. The keywords are not yet used for anything. llvm-svn: 123606
* Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,Alexis Hunt2011-01-081-1/+1
| | | | | | | more accurate, and makes it make sense for it to hold a delegating constructor call. llvm-svn: 123084
* Implement pack expansion of base initializers, so that we canDouglas Gregor2011-01-041-3/+8
| | | | | | | initialize those lovely mixins that come from pack expansions of base specifiers. llvm-svn: 122793
* Implement pack expansions whose pattern is a base-specifier.Douglas Gregor2011-01-031-1/+8
| | | | llvm-svn: 122782
* Refactor how we collect attributes during parsing, and add slots for attributesJohn McCall2010-12-241-88/+59
| | | | | | | on array and function declarators. This is pretty far from complete, and I'll revisit it later if someone doesn't beat me to it. llvm-svn: 122535
* Extend the parser to support pack expansions within exceptionDouglas Gregor2010-12-201-2/+13
| | | | | | | specifications. We can't yet instantiate them, however, since I tripped over PR8835. llvm-svn: 122292
* Added ParenType type node.Abramo Bagnara2010-12-101-1/+1
| | | | llvm-svn: 121488
* Added struct/class syntactic info for c++0x scoped enum.Abramo Bagnara2010-12-031-1/+1
| | | | llvm-svn: 120828
* In some situations, TemplateArgumentLoc wasn't setting TypeSourceLoc (seeCraig Silverstein2010-11-181-1/+1
| | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=8558). This patch fixes it. Thanks to rjmccall for all the coaching! Approved by rjmccall llvm-svn: 119697
* Region-allocate all AttributeList objects from a factory object instead of ↵Ted Kremenek2010-11-101-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | manually managing them using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up. This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList objects and then blows them away all at once. While conceptually simple, most of the changes in this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications. This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its underlying allocator as we enter/leave key methods in the Parser. This means that we get simple memory management while still having the ability to finely control memory use if necessary. Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic in many large files with attributes. This fixes the leak reported in: <rdar://problem/8650003> llvm-svn: 118675
* Diagnose attempst to template using declarations and using directives.John McCall2010-11-101-14/+42
| | | | | | Recover from the latter and fail early for the former. Fixes PR8022. llvm-svn: 118669
* tidy upChris Lattner2010-11-091-5/+5
| | | | llvm-svn: 118626
* fix PR8380, a crash on invalid due to an illogical DeclSpec SourceRange ↵Chris Lattner2010-11-091-1/+0
| | | | | | being constructed. llvm-svn: 118625
* Tag references shouldn't ever get template parameter lists.John McCall2010-10-191-4/+9
| | | | | | Fixes rdar://problem/8568507 llvm-svn: 116843
* Redirect templated friend class decls to a new Sema callback andJohn McCall2010-10-191-3/+14
| | | | | | | construct an unsupported friend when there's a friend with a templated scope specifier. Fixes a consistency crash, rdar://problem/8540527 llvm-svn: 116786
* Parse default arguments within member functions in source order, fromDouglas Gregor2010-10-121-9/+7
| | | | | | Manuel Klimek! Fixes PR7715. llvm-svn: 116311
* Add parsing support for Microsoft attributes. MS attributes will just be ↵Francois Pichet2010-10-111-0/+26
| | | | | | skipped and not inserted into the AST for now. llvm-svn: 116203
* 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
OpenPOWER on IntegriCloud