summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use early returns to avoid indentation.Anders Carlsson2009-08-271-72/+76
| | | | llvm-svn: 80209
* Stub out an error so we don't crash.Eli Friedman2009-08-271-1/+8
| | | | llvm-svn: 80207
* Add a BuildCXXTemporaryObjectExpr and use it so default arguments will be ↵Anders Carlsson2009-08-271-1/+32
| | | | | | instantiated correctly for temporary object expressions. llvm-svn: 80206
* New RequireNonAbstractType function.Anders Carlsson2009-08-271-4/+14
| | | | llvm-svn: 80183
* Bye-bye old RequireCompleteType.Anders Carlsson2009-08-261-2/+4
| | | | llvm-svn: 80182
* Implement support for C++ direct initializers that involve dependentDouglas Gregor2009-08-261-3/+19
| | | | | | types or type-dependent expressions. llvm-svn: 80143
* If a parameter has a default argument expression, make sure to instantiate ↵Anders Carlsson2009-08-251-0/+6
| | | | | | the parameter type before checking that the expression is a valid initializer. llvm-svn: 79986
* Improved support for default arguments in constructors for class templates.Anders Carlsson2009-08-251-18/+17
| | | | llvm-svn: 79984
* InitializeVarWithConstructor now returns true on failure.Anders Carlsson2009-08-251-4/+8
| | | | llvm-svn: 79976
* BuildCXXConstructExpr now returns an OwningExprResult.Anders Carlsson2009-08-251-10/+16
| | | | llvm-svn: 79975
* Basic support for default argument expressions for function templates.Anders Carlsson2009-08-251-2/+2
| | | | llvm-svn: 79972
* Factor setting default arguments out into SetParamDefaultArgument.Anders Carlsson2009-08-251-24/+29
| | | | llvm-svn: 79970
* Use hasDefaultArg instead of getDefaultArg.Anders Carlsson2009-08-251-2/+2
| | | | llvm-svn: 79967
* Check that the default argument is well-formed before checking the ↵Anders Carlsson2009-08-251-7/+7
| | | | | | initializer types. llvm-svn: 79964
* Try to complete a type before looking for conversion functions withinDouglas Gregor2009-08-241-1/+2
| | | | | | | that type. Note that we do not produce a diagnostic if the type is incomplete; rather, we just don't look for conversion functions. Fixes PR4660. llvm-svn: 79919
* Make sure to adjust function template declarations to their templatedDouglas Gregor2009-08-241-0/+16
| | | | | | | declarations (e.g., FunctionTemplateDecl -> CXXConstructorDecl) before performing semantic analysis on the declarations. Fixes PR4761. llvm-svn: 79911
* Implement conversion function templates, along with the ability to useDouglas Gregor2009-08-211-9/+23
| | | | | | | template argument deduction from a conversion function (C++ [temp.deduct.conv]) with implicit conversions. llvm-svn: 79693
* Fix parsing for out-of-line definitions of constructors andDouglas Gregor2009-08-211-1/+1
| | | | | | destructors of class templates. llvm-svn: 79678
* Introduce support for constructor templates, which can now be declaredDouglas Gregor2009-08-211-3/+16
| | | | | | | | and will participate in overload resolution. Unify the instantiation of CXXMethodDecls and CXXConstructorDecls, which had already gotten out-of-sync. llvm-svn: 79658
* Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use ↵Argyrios Kyrtzidis2009-08-211-2/+1
| | | | | | DeclaratorInfo to get this information. llvm-svn: 79584
* Initial support for parsing and representation of member function templates.Douglas Gregor2009-08-201-1/+9
| | | | llvm-svn: 79570
* Add syntax examples for the friend declaration types.John McCall2009-08-201-1/+0
| | | | | | Remove an assert trivialized by dominating code. llvm-svn: 79520
* Use Sema's LocInfoType to pass and preserve type source info through the Parser.Argyrios Kyrtzidis2009-08-191-5/+5
| | | | llvm-svn: 79395
* Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema ↵Argyrios Kyrtzidis2009-08-191-8/+15
| | | | | | | | | | | | 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
* Teach Sema how to pop out of friend function definitions in nested classes.John McCall2009-08-181-0/+3
| | | | llvm-svn: 79291
* AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and ↵Anders Carlsson2009-08-161-1/+27
| | | | | | create the CXXExprWithTemporaries before setting the initializer on the VarDecl. llvm-svn: 79176
* BuildCXXConstructExpr doesn't need to take an ASTContext.Anders Carlsson2009-08-151-6/+4
| | | | llvm-svn: 79149
* Implement __is_empty. Patch by Sean Hunt.Eli Friedman2009-08-151-2/+11
| | | | llvm-svn: 79143
* Make the CXXDefaultArgExpr constructor protected and add a static Create ↵Anders Carlsson2009-08-141-1/+1
| | | | | | function. llvm-svn: 79013
* Patch to force synthesis of copy assignment operatorFariborz Jahanian2009-08-131-0/+1
| | | | | | | | function in the order according to c++03. ir-gen for copy assignment in the trivial case and the first test case. llvm-svn: 78938
* More toward synthesizing copy assignments. SWIP.Fariborz Jahanian2009-08-121-2/+5
| | | | llvm-svn: 78861
* Patch for synthesizing copy assignment operator.Fariborz Jahanian2009-08-121-0/+1
| | | | | | WIP. llvm-svn: 78841
* Add a FriendClassDecl type for holding declarations of friend types in John McCall2009-08-111-54/+84
| | | | | | the AST, and create such declarations. llvm-svn: 78719
* ir-gen support for anonymous union data memberFariborz Jahanian2009-08-111-2/+8
| | | | | | | 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-17/+28
| | | | | | | | | | | | 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
* Drop the friend-inner-class diagnostic from an extwarn to an ext and don'tJohn McCall2009-08-061-2/+2
| | | | | | guard its report on GNUMode. llvm-svn: 78338
* Permit a class to friend its members in C++0x, without restriction.John McCall2009-08-061-7/+18
| | | | | | | Permit a class to friend its class members in C++ 98, as long as extensions are enabled (and even when they aren't, only give an extwarn about it). llvm-svn: 78332
* First pass at friend semantics.John McCall2009-08-061-6/+203
| | | | llvm-svn: 78274
* Get rid of "smart" quotes. Per report on cfe-dev.Eli Friedman2009-08-051-17/+17
| | | | llvm-svn: 78230
* Handle destruction of temporaries used in default argumentFariborz Jahanian2009-08-051-0/+1
| | | | | | construction of constructor calls. llvm-svn: 78222
* Patch to improve ir-gen for constructors with default argumentFariborz Jahanian2009-08-051-8/+20
| | | | | | expressions and a test case. llvm-svn: 78213
* Introduce the canonical type smart pointers, and use them in a few places toDouglas Gregor2009-08-051-2/+2
| | | | | | tighten up the static type system. llvm-svn: 78164
* Support for use of default argument in constructors.Fariborz Jahanian2009-08-051-2/+23
| | | | | | work in progress. llvm-svn: 78132
* Canonicalize else.Mike Stump2009-08-041-10/+5
| | | | llvm-svn: 78102
* Minor renaming/refactoring. No change in functionality.Fariborz Jahanian2009-08-031-5/+3
| | | | llvm-svn: 77985
* Add CK_DerivedToBase and use it PerformObjectMemberConversion.Anders Carlsson2009-07-311-3/+3
| | | | llvm-svn: 77652
* Change uses of:Ted Kremenek2009-07-291-28/+28
| | | | | | | | | | | | | | | | | | | | 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
* Refactor base/member initializers, and construct them correctly in cases Eli Friedman2009-07-291-83/+113
| | | | | | with dependent types. Fixes PR4621 and PR4627. llvm-svn: 77498
* More Sema check for constructor's member initializer along Fariborz Jahanian2009-07-241-0/+9
| | | | | | with type conversion to fix ir-gen crash. llvm-svn: 77000
* Diagnose when base classes and members to be intializedFariborz Jahanian2009-07-231-7/+28
| | | | | | with constructors don't have a matching constructor. llvm-svn: 76913
OpenPOWER on IntegriCloud