summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve diagnostic location information when checking the initialization of ↵Douglas Gregor2009-09-231-0/+2
| | | | | | a reference llvm-svn: 82666
* When code-completion after a "," is building an overload set, noteDouglas Gregor2009-09-231-1/+2
| | | | | | | | that there is one more argument (the one following the comma) and make the candidate non-viable if the function cannot accept any argument in that position. llvm-svn: 82625
* Produce detailed diagnostics when overloadFariborz Jahanian2009-09-231-5/+32
| | | | | | | resolution failed to select a candidate due to ambiguity in type conversion function selection. llvm-svn: 82596
* Code refactoring and cleanup.Fariborz Jahanian2009-09-221-22/+23
| | | | llvm-svn: 82566
* Issue good ambiguity diagnostic when convesion fails.Fariborz Jahanian2009-09-221-7/+16
| | | | llvm-svn: 82565
* Implement code completion within a function call, triggered after theDouglas Gregor2009-09-221-71/+120
| | | | | | | | | | | | | | | | | | | | | opening parentheses and after each comma. We gather the set of visible overloaded functions, perform "partial" overloading based on the set of arguments that we have thus far, and return the still-viable results sorted by the likelihood that they will be the best candidate. Most of the changes in this patch are a refactoring of the overloading routines for a function call, since we needed to separate out the notion of building an overload set (common to code-completion and normal semantic analysis) and then what to do with that overload set. As part of this change, I've pushed explicit template arguments into a few more subroutines. There is still much more work to do in this area. Function templates won't be handled well (unless we happen to deduce all of the template arguments before we hit the completion point), nor will overloaded function-call operators or calls to member functions. llvm-svn: 82549
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-211-25/+25
| | | | | | | | | | | Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
* When printing an overload candidate that is a function template specialization,Douglas Gregor2009-09-151-0/+7
| | | | | | | | | | point at the template and print out its template arguments, e.g., ambiguous-ovl-print.cpp:5:8: note: candidate function template specialization [with T = int] void f(T*, long); llvm-svn: 81907
* Issue good diagnostics when initialization failes due toFariborz Jahanian2009-09-151-11/+12
| | | | | | ambiguity in type conversion function selection. llvm-svn: 81898
* Issue a good diagnostics when attempt to selectFariborz Jahanian2009-09-151-4/+16
| | | | | | a type convesion function results in ambiguity. llvm-svn: 81812
* Implement partial ordering of function templates when calling aDouglas Gregor2009-09-141-1/+2
| | | | | | conversion function. llvm-svn: 81807
* Test function template partial ordering when resolving the address ofDouglas Gregor2009-09-141-1/+1
| | | | | | an overloaded function (template). llvm-svn: 81804
* Used visible conversion function api to do overloadFariborz Jahanian2009-09-141-3/+6
| | | | | | | resolution of type conversion functions in base and current class. llvm-svn: 81784
* Implement partial ordering of function template specializations Douglas Gregor2009-09-141-3/+3
| | | | | | (C++ [temp.func.order]). llvm-svn: 81777
* Use the correct CastKind for derived-to-base pointer conversions.Anders Carlsson2009-09-121-4/+9
| | | | llvm-svn: 81608
* Undid my yesterday patch which is not needed with an upcoming patch.Fariborz Jahanian2009-09-111-50/+25
| | | | llvm-svn: 81549
* Look for overloaded arrow operators in base classes.Anders Carlsson2009-09-101-5/+7
| | | | llvm-svn: 81475
* Patch to collect conversion methods in base(s) and derivedFariborz Jahanian2009-09-101-25/+49
| | | | | | class into a candidate set. llvm-svn: 81467
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-380/+363
| | | | llvm-svn: 81346
* Preliminary AST representation and semantic analysis forDouglas Gregor2009-09-011-3/+5
| | | | | | | | | explicitly-specified template argument lists in member reference expressions, e.g., x->f<int>() llvm-svn: 80646
* Fix this for real.Anders Carlsson2009-08-281-1/+1
| | | | llvm-svn: 80377
* When doing overload resolution, expressions that are value dependent but not ↵Anders Carlsson2009-08-281-4/+18
| | | | | | type dependent and of integral type should not be treated as null pointer constants. llvm-svn: 80369
* Pass InOverloadResolution all the way down to IsPointerConversion.Anders Carlsson2009-08-281-7/+12
| | | | llvm-svn: 80368
* When looking for overloaded member operators, make sure to instantiateDouglas Gregor2009-08-271-4/+10
| | | | | | | | | class template specializations (when possible) and look into base classes. Thanks to Eli for the test case! FIXME -=1. llvm-svn: 80302
* Add an InOverloadResolution flag to TryCopyInitialization.Anders Carlsson2009-08-271-6/+12
| | | | llvm-svn: 80261
* Remove more default arguments.Anders Carlsson2009-08-271-3/+9
| | | | llvm-svn: 80260
* Remove default arguments from TryImplicitConversion and fix a bug found in ↵Anders Carlsson2009-08-271-2/+8
| | | | | | the process. llvm-svn: 80258
* Remove default argument from TryCopyInitialization.Anders Carlsson2009-08-271-3/+9
| | | | llvm-svn: 80256
* Revert the flags change for now, I have a better idea for this.Anders Carlsson2009-08-271-11/+7
| | | | llvm-svn: 80255
* Add a OverloadResolutionFlags and start converting some of the overload ↵Anders Carlsson2009-08-271-7/+11
| | | | | | methods over to using it instead of bools arguments. llvm-svn: 80248
* Bye-bye old RequireCompleteType.Anders Carlsson2009-08-261-2/+4
| | | | llvm-svn: 80182
* Fix for overloaded binary operators whose operands need implicitDouglas Gregor2009-08-261-16/+17
| | | | | | conversions, from Sylvere Teissier! llvm-svn: 80112
* Try to complete a type before looking for conversion functions withinDouglas Gregor2009-08-241-25/+40
| | | | | | | 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
* Refactor the template-instantiation logic for expressions into aDouglas Gregor2009-08-241-24/+59
| | | | | | | generic tree transformation (also used for recanonicalization) and a small amount of template-instantiation-specific logic. llvm-svn: 79917
* Fix build of clang with gcc-4.4: #include <cstdio> was missing.Torok Edwin2009-08-241-0/+1
| | | | llvm-svn: 79916
* Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. ↵Anders Carlsson2009-08-221-2/+10
| | | | | | Make -ast-dump print out the cast kinds of cast expressions. llvm-svn: 79787
* Implement conversion function templates, along with the ability to useDouglas Gregor2009-08-211-21/+136
| | | | | | | 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-27/+32
| | | | | | | | and will participate in overload resolution. Unify the instantiation of CXXMethodDecls and CXXConstructorDecls, which had already gotten out-of-sync. llvm-svn: 79658
* gcc told me to add these.Daniel Dunbar2009-08-211-1/+1
| | | | llvm-svn: 79589
* Implement support for calling member function templates, which involves:Douglas Gregor2009-08-211-14/+73
| | | | | | | | | | - Allowing one to name a member function template within a class template and on the right-hand side of a member access expression. - Template argument deduction for calls to member function templates. - Registering specializations of member function templates (and finding them later). llvm-svn: 79581
* Make integer promotions work correctly on PIC16 and other platforms Eli Friedman2009-08-191-4/+5
| | | | | | | | where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType out of Sema, since it was only there as a historical artifact. Patch by Enea Zaffanella. llvm-svn: 79412
* Call MaybeBindToTemporary for overloaded binary and unary operators.Anders Carlsson2009-08-161-6/+7
| | | | llvm-svn: 79173
* Call MaybeBindToTemporary when constructing functino call operator calls.Anders Carlsson2009-08-161-1/+1
| | | | llvm-svn: 79172
* Add MaybeBindToTemporary calls for member call expressions.Anders Carlsson2009-08-161-2/+2
| | | | llvm-svn: 79171
* Move builtin call checking out into a separate function, make ↵Anders Carlsson2009-08-161-2/+8
| | | | | | CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change. llvm-svn: 79157
* Make the CXXDefaultArgExpr constructor protected and add a static Create ↵Anders Carlsson2009-08-141-1/+1
| | | | | | function. llvm-svn: 79013
* Use the correct cast kind as suggested by Doug.Anders Carlsson2009-08-071-1/+2
| | | | llvm-svn: 78395
* After reporting ill-formed copy constructor(12.8.p3)Fariborz Jahanian2009-08-061-1/+2
| | | | | | don't recurs and crash. llvm-svn: 78323
* Support nested-name-specifiers for C++ member access expressions, e.g.,Douglas Gregor2009-08-061-18/+14
| | | | | | | | this->Base::foo from James Porter! llvm-svn: 78278
* Get rid of "smart" quotes. Per report on cfe-dev.Eli Friedman2009-08-051-1/+1
| | | | llvm-svn: 78230
OpenPOWER on IntegriCloud