summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Patch to instantiate destructors used to destructFariborz Jahanian2009-09-031-0/+4
| | | | | | base and data members when they are needed. llvm-svn: 80967
* Improve template instantiation for member access expressions thatDouglas Gregor2009-09-031-1/+12
| | | | | | | | | involve qualified names, e.g., x->Base::f. We now maintain enough information in the AST to compare the results of the name lookup of "Base" in the scope of the postfix-expression (determined at template definition time) and in the type of the object expression. llvm-svn: 80953
* Rewrite of our handling of name lookup in C++ member access expressions, e.g.,Douglas Gregor2009-09-021-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | x->Base::f We no longer try to "enter" the context of the type that "x" points to. Instead, we drag that object type through the parser and pass it into the Sema routines that need to know how to perform lookup within member access expressions. We now implement most of the crazy name lookup rules in C++ [basic.lookup.classref] for non-templated code, including performing lookup both in the context of the type referred to by the member access and in the scope of the member access itself and then detecting ambiguities when the two lookups collide (p1 and p4; p3 and p7 are still TODO). This change also corrects our handling of name lookup within template arguments of template-ids inside the nested-name-specifier (p6; we used to look into the scope of the object expression for them) and fixes PR4703. I have disabled some tests that involve member access expressions where the object expression has dependent type, because we don't yet have the ability to describe dependent nested-name-specifiers starting with an identifier. llvm-svn: 80843
* Add a CK_FunctionToPointerDecay cast kind.Anders Carlsson2009-09-011-1/+1
| | | | llvm-svn: 80719
* Preliminary AST representation and semantic analysis forDouglas Gregor2009-09-011-15/+0
| | | | | | | | | explicitly-specified template argument lists in member reference expressions, e.g., x->f<int>() llvm-svn: 80646
* Add parsing for references to member function templates with explicitDouglas Gregor2009-08-311-0/+15
| | | | | | | | template argument lists, e.g., x.f<int>(). Semantic analysis will be a separate commit. llvm-svn: 80624
* Support explicit C++ member operator syntax, from James Porter!Douglas Gregor2009-08-311-0/+37
| | | | llvm-svn: 80608
* Patch for code gen. for c-style cast which ends inFariborz Jahanian2009-08-291-0/+1
| | | | | | using class's conversion functions [12.3.2-p2] llvm-svn: 80433
* path to ir-gen 12.3.1 Conversion by constructorFariborz Jahanian2009-08-281-7/+20
| | | | llvm-svn: 80398
* Pass InOverloadResolution all the way down to IsPointerConversion.Anders Carlsson2009-08-281-7/+14
| | | | llvm-svn: 80368
* ir-gen related patch for type conversionFariborz Jahanian2009-08-281-2/+5
| | | | | | with class type conversion methods. WIP. llvm-svn: 80365
* Add an InOverloadResolution flag to TryCopyInitialization.Anders Carlsson2009-08-271-1/+2
| | | | llvm-svn: 80261
* Remove more default arguments.Anders Carlsson2009-08-271-3/+12
| | | | llvm-svn: 80260
* Remove default arguments from TryImplicitConversion and fix a bug found in ↵Anders Carlsson2009-08-271-8/+31
| | | | | | the process. llvm-svn: 80258
* Remove default argument from TryCopyInitialization.Anders Carlsson2009-08-271-1/+3
| | | | llvm-svn: 80256
* Revert the flags change for now, I have a better idea for this.Anders Carlsson2009-08-271-8/+3
| | | | llvm-svn: 80255
* Add a OverloadResolutionFlags and start converting some of the overload ↵Anders Carlsson2009-08-271-3/+8
| | | | | | methods over to using it instead of bools arguments. llvm-svn: 80248
* Add a BuildCXXTemporaryObjectExpr and use it so default arguments will be ↵Anders Carlsson2009-08-271-8/+9
| | | | | | instantiated correctly for temporary object expressions. llvm-svn: 80206
* In ActOnCXXTypeConstructExpr, check that the type is complete and ↵Anders Carlsson2009-08-271-14/+14
| | | | | | non-abstract before creating any expressions. This assures that any templates are instantiated if necessary. llvm-svn: 80200
* Bye-bye old RequireCompleteType.Anders Carlsson2009-08-261-5/+6
| | | | llvm-svn: 80182
* Remove the PrintType argument from RequireCompleteType.Anders Carlsson2009-08-261-8/+8
| | | | llvm-svn: 80174
* AST for conversion by conversion functions. WIP.Fariborz Jahanian2009-08-261-6/+14
| | | | llvm-svn: 80135
* More support for pseudo dtors.Anders Carlsson2009-08-261-9/+26
| | | | llvm-svn: 80129
* update to CXXFunctionalCastExpr to support ir-gen forFariborz Jahanian2009-08-261-2/+5
| | | | | | type convesions of class objects [class.conv]. WIP. llvm-svn: 80127
* Address some of Doug's comments.Anders Carlsson2009-08-261-1/+1
| | | | llvm-svn: 80114
* Parsing of pseudo-destructors.Anders Carlsson2009-08-251-0/+24
| | | | llvm-svn: 80055
* BuildCXXConstructExpr now returns an OwningExprResult.Anders Carlsson2009-08-251-1/+7
| | | | llvm-svn: 79975
* Implement support for equality comparisons (!=, ==) of memberDouglas Gregor2009-08-241-19/+62
| | | | | | | | | | pointers, by extending the "composite pointer type" logic to include member pointer types. Introduce test cases for member pointer comparisons, including those that involve the builtin operator candidates implemented earlier. llvm-svn: 79925
* Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. ↵Anders Carlsson2009-08-221-6/+7
| | | | | | Make -ast-dump print out the cast kinds of cast expressions. llvm-svn: 79787
* Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use ↵Argyrios Kyrtzidis2009-08-211-2/+1
| | | | | | DeclaratorInfo to get this information. llvm-svn: 79584
* Use Sema's LocInfoType to pass and preserve type source info through the Parser.Argyrios Kyrtzidis2009-08-191-4/+10
| | | | llvm-svn: 79395
* Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema ↵Argyrios Kyrtzidis2009-08-191-4/+9
| | | | | | | | | | | | 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
* Store the delete operator for delete expressions.Anders Carlsson2009-08-161-10/+41
| | | | llvm-svn: 79200
* AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and ↵Anders Carlsson2009-08-161-5/+1
| | | | | | 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-2/+5
| | | | llvm-svn: 79149
* Check whether a tag was defined in a C++ condition declaration using ↵Argyrios Kyrtzidis2009-08-111-13/+5
| | | | | | GetTypeForDeclarator. llvm-svn: 78644
* Use CastExpr::CK_ArrayToPointerDecay and fix an assert.Anders Carlsson2009-08-081-1/+1
| | | | llvm-svn: 78502
* More CastKind work.Anders Carlsson2009-08-071-3/+3
| | | | llvm-svn: 78415
* Set and use Elidable in elimination of copy ctors.Fariborz Jahanian2009-08-061-2/+4
| | | | llvm-svn: 78331
* Patch to improve ir-gen for constructors with default argumentFariborz Jahanian2009-08-051-2/+2
| | | | | | 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-1/+1
| | | | | | tighten up the static type system. llvm-svn: 78164
* Canonicalize else.Mike Stump2009-08-041-3/+2
| | | | llvm-svn: 78102
* Minor renaming/refactoring. No change in functionality.Fariborz Jahanian2009-08-031-1/+3
| | | | llvm-svn: 77985
* Add CK_DerivedToBase and use it PerformObjectMemberConversion.Anders Carlsson2009-07-311-0/+2
| | | | llvm-svn: 77652
* Add a CastKind enum to CastExpr. Right now it's not used for much but it ↵Anders Carlsson2009-07-311-2/+3
| | | | | | will be :) llvm-svn: 77650
* Change uses of:Ted Kremenek2009-07-291-17/+17
| | | | | | | | | | | | | | | | | | | | 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
* Make functional-style casts emit correct messages, and fix a crash-on-invalid.Sebastian Redl2009-07-291-1/+1
| | | | llvm-svn: 77451
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-17/+17
| | | | | | | | | 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
* Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek2009-07-161-6/+6
| | | | | | | | | | | | | | | | | | | | | This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
OpenPOWER on IntegriCloud