summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/overload-call.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Record some basic information about bad conversion sequences. Use thatJohn McCall2010-01-131-2/+8
| | | | | | | information to feed diagnostics instead of regenerating it. Much room for improvement here, but fixes some unfortunate problems reporting on method calls. llvm-svn: 93316
* Improve the reporting of non-viable overload candidates by noting the reasonJohn McCall2010-01-131-1/+1
| | | | | | | | why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements should probably be integrated with the bad-initialization reporting routines. llvm-svn: 93277
* Reorganize some of the code to note overload candidates. Improves theJohn McCall2010-01-121-0/+10
| | | | | | | fidelity with which we note them as functions/constructors and templates thereof. Also will be helpful when reporting bad conversions (next). llvm-svn: 93224
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Don't assume that all conversions to a void pointer are convertingDouglas Gregor2009-12-131-0/+10
| | | | | | from a PointerType. Fixes PR5756. llvm-svn: 91253
* First pass at implementing C++ enum semantics: calculate (and store) anJohn McCall2009-12-091-1/+1
| | | | | | | | | | | | "integer promotion" type associated with an enum decl, and use this type to determine which type to promote to. This type obeys C++ [conv.prom]p2 and is therefore generally signed unless the range of the enumerators forces it to be unsigned. Kills off a lot of false positives from -Wsign-compare in C++, addressing rdar://7455616 llvm-svn: 90965
* When we encounter a derived-to-base conversion when performing anDouglas Gregor2009-11-061-0/+13
| | | | | | | implicit conversion sequence, check the validity of this conversion and then perform it. llvm-svn: 86210
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* In C++, set the type of each of the enumerators in an enumeration toDouglas Gregor2008-12-121-3/+3
| | | | | | | | | | | | | | | the type of the enumeration once the enumeration has been defined. Fix the overloading test-case to properly create enums that promote the way we want them to. Implement C++0x promotions from enumeration types to long long/unsigned long long. We're using these promotions in Carbon.h (since long long is a common extension). Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954 llvm-svn: 60917
* Test conversion from apointer to incomplete type to void* in C++Douglas Gregor2008-11-261-1/+4
| | | | llvm-svn: 60131
* Simplify and correct the check for function redefinitions. This does two things:Douglas Gregor2008-10-291-2/+2
| | | | | | | | | | - Allows definitions of overloaded functions :) - Eliminates extraneous error messages when we have a definition of a function that isn't an overload but doesn't have exactly the same type as the original. llvm-svn: 58382
* Implement overloading rules for reference bindingDouglas Gregor2008-10-291-0/+22
| | | | llvm-svn: 58381
* Tweak Sema::CheckReferenceInit so that it (optionally) computes an Douglas Gregor2008-10-291-0/+28
| | | | | | | | | | | ImplicitConversionSequence and, when doing so, following the specific rules of [over.best.ics]. The computation of the implicit conversion sequences implements C++ [over.ics.ref], but we do not (yet) have ranking for implicit conversion sequences that use reference binding. llvm-svn: 58357
* Implement initialization of a reference (C++ [dcl.init.ref]) as partDouglas Gregor2008-10-291-0/+11
| | | | | | | | | | | | | | | | | | | of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. llvm-svn: 58353
* Add support for conversions from a pointer-to-derived to aDouglas Gregor2008-10-231-0/+29
| | | | | | | | | | | | pointer-to-base. Also, add overload ranking for pointer conversions (for both pointer-to-void and derived-to-base pointer conversions). Note that we do not yet diagnose derived-to-base pointer conversion errors that stem from ambiguous or inacessible base classes. These aren't handled during overload resolution; rather, when the conversion is actually used we go ahead and diagnose the error. llvm-svn: 58017
* Implement ranking of standard conversion sequences by their qualificationDouglas Gregor2008-10-221-1/+22
| | | | | | | | | | | | conversions (e.g., comparing int* -> const int* against int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3. Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of IsQualificationConversion and CompareQualificationConversion (and fix the handling of the int* -> volatile int* conversion in the former). llvm-svn: 57978
* Fix a thinko in the qualification-conversion check when the qualificaitons ↵Douglas Gregor2008-10-221-0/+29
| | | | | | are disjoint, and add some overloading-based tests of qualification conversions llvm-svn: 57942
* Preliminary support for function overloadingDouglas Gregor2008-10-211-0/+137
llvm-svn: 57909
OpenPOWER on IntegriCloud