summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix this for real.Anders Carlsson2009-08-281-2/+2
| | | | llvm-svn: 80377
* Omnibus friend decl refactoring. Instead of cloning AST classes for friendJohn McCall2009-08-281-13/+13
| | | | | | | | | | | | | | declarations of same, introduce a single AST class and add appropriate bits (encoded in the namespace) for whether a decl is "real" or not. Much hackery about previously-declared / not-previously-declared, but it's essentially mandated by the standard that friends alter lookup, and this is at least fairly non-intrusive. Refactor the Sema methods specific to friends for cleaner flow and less nesting. Incidentally solve a few bugs, but I remain confident that we can put them back. llvm-svn: 80353
* Check in UnresolvedUsingDecl.Anders Carlsson2009-08-281-0/+11
| | | | llvm-svn: 80336
* Skip over bases/fields with dependent types.Fariborz Jahanian2009-08-251-0/+4
| | | | | | Fixes pr4771. llvm-svn: 79999
* BuildCXXConstructExpr now returns an OwningExprResult.Anders Carlsson2009-08-251-1/+1
| | | | llvm-svn: 79975
* Fixes pr4763. Fariborz Jahanian2009-08-241-4/+7
| | | | llvm-svn: 79923
* Implement conversion function templates, along with the ability to useDouglas Gregor2009-08-211-0/+8
| | | | | | | template argument deduction from a conversion function (C++ [temp.deduct.conv]) with implicit conversions. llvm-svn: 79693
* Introduce support for constructor templates, which can now be declaredDouglas Gregor2009-08-211-0/+12
| | | | | | | | and will participate in overload resolution. Unify the instantiation of CXXMethodDecls and CXXConstructorDecls, which had already gotten out-of-sync. llvm-svn: 79658
* We now support overriding base functions in vtables. WIP.Mike Stump2009-08-211-0/+2
| | | | llvm-svn: 79587
* Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema ↵Argyrios Kyrtzidis2009-08-191-7/+12
| | | | | | | | | | | | interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. llvm-svn: 79392
* Fix test failure due to uninitialized member.Eli Friedman2009-08-151-4/+4
| | | | llvm-svn: 79145
* More toward synthesizing copy assignments. SWIP.Fariborz Jahanian2009-08-121-2/+3
| | | | llvm-svn: 78861
* Add a FriendClassDecl type for holding declarations of friend types in John McCall2009-08-111-2/+8
| | | | | | the AST, and create such declarations. llvm-svn: 78719
* ir-gen support for anonymous union data memberFariborz Jahanian2009-08-111-0/+5
| | | | | | | copying in copy constructors and used in default constructor's initializer list. llvm-svn: 78700
* Argument-dependent lookup for friend declarations. Add a new decl type,John McCall2009-08-111-0/+9
| | | | | | | | | | | | FriendFunctionDecl, and create instances as appropriate. The design of FriendFunctionDecl is still somewhat up in the air; you can befriend arbitrary types of functions --- methods, constructors, etc. --- and it's not clear that this representation captures that very well. We'll have a better picture when we start consuming this data in access control. llvm-svn: 78653
* Fix an indentation.Fariborz Jahanian2009-08-101-2/+1
| | | | llvm-svn: 78624
* Support for anonymous union in ctor's initializer andFariborz Jahanian2009-08-101-2/+18
| | | | | | bunch of FIXMEs for their is-gen. llvm-svn: 78623
* Fix some const_cast issues. This is the beginning of the rabbit hole.Mike Stump2009-08-071-6/+3
| | | | llvm-svn: 78393
* Introduce the canonical type smart pointers, and use them in a few places toDouglas Gregor2009-08-051-1/+2
| | | | | | tighten up the static type system. llvm-svn: 78164
* Compute end_overridden_methods in a way that keeps ENABLE_EXPENSIVE_CHECKSDaniel Dunbar2009-08-021-1/+1
| | | | | | happy. llvm-svn: 77850
* Avoid accessing invalid std::vector element; this makes clangDaniel Dunbar2009-08-011-2/+3
| | | | | | ENABLE_EXPENSIVE_CHECKS clean on x86_64-.*-darwin10. llvm-svn: 77831
* Add code to setup the vtable pointer in the constructor. Work in progress.Mike Stump2009-07-311-1/+3
| | | | llvm-svn: 77699
* Make tag declarations redeclarable. This change has three purposes:Douglas Gregor2009-07-291-2/+6
| | | | | | | | | | | | | | | | 1) Allow the Index library (and any other interested client) to walk the set of declarations for a given tag (enum, union, class, whatever). At the moment, this information is not readily available. 2) Reduce our dependence on TagDecl::TypeForDecl being mapped down to a TagType (for which getDecl() will return the tag definition, if one exists). This property won't exist for class template partial specializations. 3) Make the canonical declaration of a TagDecl actually canonical, e.g., so that it does not change when the tag is defined. llvm-svn: 77523
* Change uses of:Ted Kremenek2009-07-291-14/+14
| | | | | | | | | | | | | | | | | | | | Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
* Some code refactoring per Daniel's feedback.Fariborz Jahanian2009-07-251-16/+12
| | | | llvm-svn: 77030
* More work toward initialization of objectsFariborz Jahanian2009-07-241-2/+3
| | | | | | in constructors. llvm-svn: 76980
* This patch fixes the implementations of the __has_trivial_destructorDouglas Gregor2009-07-231-16/+9
| | | | | | | | and __has_trivial_constructor builtin pseudo-functions and additionally implements __has_trivial_copy and __has_trivial_assign, from John McCall! llvm-svn: 76916
* Diagnose when base classes and members to be intializedFariborz Jahanian2009-07-231-6/+13
| | | | | | with constructors don't have a matching constructor. llvm-svn: 76913
* Add constructor used to initialize base/member inFariborz Jahanian2009-07-231-3/+24
| | | | | | | CXXBaseOrMemberInitializer AST node. Needed by its clients to do the initialization. llvm-svn: 76826
* Fix some memory allocation/deallocation issuesDouglas Gregor2009-07-221-4/+3
| | | | llvm-svn: 76783
* Improved on performance of the algorithm for proper ordering ofFariborz Jahanian2009-07-221-44/+39
| | | | | | ctor's initialization of bases and fields. llvm-svn: 76776
* "This patch implements the restrictions on union members detailed inDouglas Gregor2009-07-221-3/+16
| | | | | | [class.union]p1", from John McCall! llvm-svn: 76766
* Allocate BaseOrMemberInitializers and CXXBaseSpecifier nodesFariborz Jahanian2009-07-221-4/+7
| | | | | | via ASTContext. llvm-svn: 76758
* Minor mod. per Doug's comment.Fariborz Jahanian2009-07-221-2/+2
| | | | llvm-svn: 76708
* Patch to accomodate Doug's comment on defaultFariborz Jahanian2009-07-211-10/+32
| | | | | | destruction of base/members for each destructor AST. llvm-svn: 76663
* Add the location of the tag keyword into TagDecl. From EneaDouglas Gregor2009-07-211-3/+5
| | | | | | Zaffanella, with tweaks from Abramo Bagnara. llvm-svn: 76576
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-11/+11
| | | | | | | | | until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
* Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek2009-07-171-11/+11
| | | | | | Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
* Added ASTs to destructor decl AST for default destruction of object'sFariborz Jahanian2009-07-151-0/+44
| | | | | | base/members. llvm-svn: 75849
* Fixed a bug in building ctor-initializer AST.Fariborz Jahanian2009-07-141-2/+3
| | | | llvm-svn: 75692
* Support data members of array type in defaultFariborz Jahanian2009-07-141-1/+3
| | | | | | ctor-initializer AST build. llvm-svn: 75662
* Moved a FIXME to where it was meant to be.Fariborz Jahanian2009-07-141-1/+1
| | | | llvm-svn: 75651
* Patch to build AST for ctor's initializer list according toFariborz Jahanian2009-07-141-1/+70
| | | | | | semantics of order of construction [class.init]. llvm-svn: 75649
* Fix breakage on Windows, cannot redeclare loop variable i in the immediate ↵Alisdair Meredith2009-07-111-4/+4
| | | | | | scope of loop. Rename variable to j. llvm-svn: 75365
* Fix type of 'this' and add a decltype test.Anders Carlsson2009-07-101-1/+1
| | | | llvm-svn: 75291
* Patch to build list of inherited virtual base classes Fariborz Jahanian2009-07-101-3/+69
| | | | | | | | in their order of construction for each class and use it to to check on propery order of base class construction under -Wreorder option. llvm-svn: 75270
* Fix a corner case with argument-dependent lookup and overloaded function sets.Douglas Gregor2009-07-081-0/+33
| | | | llvm-svn: 74999
* A few change per Doug's feedback.Fariborz Jahanian2009-07-071-3/+2
| | | | | | - Fariborz llvm-svn: 74909
* Patch to allocate list of bases in CXXRecordDeclFariborz Jahanian2009-07-021-5/+9
| | | | | | using ASTContxt allocation. llvm-svn: 74717
* Use Destroy for member initializer list clean up.Fariborz Jahanian2009-07-011-1/+9
| | | | | | Per Doug's comments. Doug please review. llvm-svn: 74666
OpenPOWER on IntegriCloud