651f13cea278ec967336033dd032faef0e9fc2ec |
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
emp.deduct.type/p9-0x.cpp
|
4b02dff7aebb98d2d60b2ff4d3fc86109213128c |
05-Mar-2013 |
David Blaikie <dblaikie@gmail.com> |
Add quotation marks to template names in diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176474 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/basic.cpp
|
29805ca6d278b4d9563adfee67f2478f0fecdcfc |
31-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Improve 'failed template argument deduction' diagnostic for the case where we have a direct mismatch between some component of the template and some component of the argument. The diagnostic now says what the mismatch was, but doesn't yet say which part of the template doesn't match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174039 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/basic.cpp
emp.deduct.call/p1-0x.cpp
|
030a6644f253818b81b4d8a7fc1770c0a3d35474 |
06-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix http://stackoverflow.com/questions/13521163 Don't require that, during template deduction, a template specialization type as a function parameter has at least as many template arguments as one used in a function argument (not even if the argument has been resolved to an exact type); the additional parameters might be provided by default template arguments in the template. We don't need this check, since we now implement [temp.deduct.call]p4 with an additional check after deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169475 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p9-0x.cpp
|
8e8fb3be5bd78f0564444eca02b404566a5f3b5d |
19-Oct-2012 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
wg1170.cpp
finae-1.cpp
emp.deduct.call/p2.cpp
emp.deduct.call/p4.cpp
emp.deduct.conv/p2.cpp
emp.deduct.conv/p3.cpp
emp.deduct.partial/p12.cpp
emp.deduct.partial/p9-0x.cpp
emp.deduct.type/p10-0x.cpp
emp.deduct.type/p2-0x.cpp
emp.deduct.type/p21.cpp
emp.deduct.type/p22.cpp
emp.deduct.type/p5-0x.cpp
emp.deduct.type/p8-0x.cpp
|
860d9b780b54f56cd27e16620196d213385d31f7 |
12-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
C++11 [temp.deduct.call]p6 tweak: when given a set of overlaoded functions that includes an explicit template argument list, perform an inner deduction against each of the function templates in that list and, if successful, use the result of that deduction for the outer template argument deduction. Fixes PR11713. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152575 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p6.cpp
|
fc55a8290a3e81111c0a373e1a04b09dd7da0b98 |
11-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
When template argument deduction is ignoring qualifiers, perform deep structural comparison of non-dependent types. Otherwise, we end up rejecting cases where the non-dependent types don't match due to qualifiers in, e.g., a pointee type. Fixes PR12132. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152529 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p4.cpp
|
762bb9d0ad20320b9f97a841dce57ba5e8e48b07 |
14-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update all tests other than Driver/std.cpp to use -std=c++11 rather than -std=c++0x. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
wg1170.cpp
emp.deduct.call/p1-0x.cpp
emp.deduct.call/p3-0x.cpp
emp.deduct.partial/p12.cpp
emp.deduct.partial/p9-0x.cpp
emp.deduct.type/p10-0x.cpp
emp.deduct.type/p2-0x.cpp
emp.deduct.type/p21.cpp
emp.deduct.type/p22.cpp
emp.deduct.type/p5-0x.cpp
emp.deduct.type/p8-0x.cpp
emp.deduct.type/p9-0x.cpp
|
d8f5b333f96b4e8018ff3a0d0db62d9e78eb6bdd |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Per the note in C++0x [temp.deduct.call]p4, don't attempt template argument deduction against a function parameter that has no deducible template parameters in it. Fixes PR8598. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141517 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p4.cpp
|
18e0461ad72dcf6ec93cd3b1df7bf1b5a30b10b7 |
18-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Accept no-return stripping conversions for pointer type arguments after deducing template parameter types. Recently Clang began enforcing the more strict checking that the argument type and the deduced function parameter type (after substitution) match, but that only consideres qualification conversions. One problem with this patch is that we check noreturn conversions and qualification conversions independently. If a valid conversion would require *both*, perhaps interleaved with each other, it will be rejected. If this actually occurs (I'm not yet sure it does) and is in fact a problem (I'm not yet sure it is), there is a FIXME to implement more intelligent conversion checking. However, this step at least allows Clang to resume accepting valid code we're seeing in the wild. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133327 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
dbfb371e297794e827ad2e5b33b45fafbfc46b29 |
16-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the consistency checking for C++ [temp.deduct.call]p3, which checks that the deduced argument type for a function call matches the actual argument type provided. The only place we've found where the consistency checking should actually cause template argument deduction failure is due to qualifier differences that don't fall into the realm of qualification conversions (which are *not* checked when we initially perform deduction). However, we're performing the full checking as specified in the standard to ensure that no other cases exist. Fixes PR9233 / <rdar://problem/9039590>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133163 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
7822ee3ef9f0d5cfd289258614ac31be70097449 |
12-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement CWG1170, which makes access-control errors into template argument deduction failures. Only implemented in C++0x, since this is a significant change in behavior from C++98/03. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131209 91177308-0d34-0410-b5e6-96231b3b80d8
wg1170.cpp
|
c6daf0b29d6c48a99cb1ad707973a7e6dfcafd58 |
17-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When printing a qualified type, look through a substituted template parameter type to see what's behind it, so that we don't end up printing silly things like "float const *" when "const float *" would make more sense. Also, replace the pile of "isa" tests with a simple switch enumerating all of the cases, making a few more obvious cases use prefix qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125729 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3-0x.cpp
|
e3c7a7ca66c02567543dbb5ec493818e00e8b177 |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Rvalue references for *this: tentative parsing and template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124295 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p8-0x.cpp
|
73b3cf6503f72f054288cf474e1a8c8ae56383c2 |
25-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the rvalue-reference deduction transformation (from T&& -> T) when taking the address of an overloaded function or matching a specialization to a template (C++0x [temp.deduct.type]p10). Fixes PR9044. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124197 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p10-0x.cpp
|
b939a1987318f802fd25f89e15ae7d2423161cac |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement core issue 1164, which concerns the partial ordering of f(T&) and f(T&&). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123981 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.partial/p9-0x.cpp
|
dd0e023cf8faf95eb8025a02ce6fd19ef7788216 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
More testing to C++0x [temp.deduct.call]p3 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123967 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3-0x.cpp
|
2ad746aeb90e86cea7afaf552a02ae3f3b5ec859 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the special template argument deduction rule for T&& in a call (C++0x [temp.deduct.call]p3). As part of this, start improving the reference-binding implementation used in the computation of implicit conversion sequences (for overload resolution) to reflect C++0x semantics. It still needs more work and testing, of course. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123966 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3-0x.cpp
|
dfc331e04d4c6a09fb693a15fc5a57d29a198c86 |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Explicitly track the number of call arguments provided when performing overload resolution, so that we only use that number of call arguments for partial ordering. Fixes PR9006, a recent regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123861 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.partial/p11.cpp
|
77d6bb9e223496aa5288294f34e7225d1f65dddc |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement partial ordering of class template partial specializations and function templates that contain variadic templates. This involves three small-ish changes: (1) When transforming a pack expansion, if the transformed argument still contains unexpanded parameter packs, build a pack expansion. This can happen during the substitution that occurs into class template partial specialiation template arguments during partial ordering. (2) When performing template argument deduction where the argument is a pack expansion, match against the pattern of that pack expansion. (3) When performing template argument deduction against a non-pack parameter, or a non-expansion template argument, deduction fails if the argument itself is a pack expansion (C++0x [temp.deduct.type]p22). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123279 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.partial/p12.cpp
emp.deduct.type/p22.cpp
|
4e97586b804f6132d83cb534f16a5b6a7756e819 |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add another test for [temp.func.order]p5/[temp.deduct.partial]p11, from James Widman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123245 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.partial/p11.cpp
|
5c7bf42ef16dc767615bed10f3b7b3c1265314e1 |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ [temp.func.order]p5 more directly, by passing down the number of explicit call arguments. This actually fixes an erroneous test for [temp.deduct.partial]p11, where we were considering parameters corresponding to arguments beyond those that were explicitly provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123244 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.partial/p11.cpp
|
2e996d929d2593e5131640e774d04fe433ba5f89 |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add example from C++0x [temp.deduct.type]p21, which already works git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123237 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p21.cpp
|
21371ea7cf647f4f0f783faac325925cb8febb1c |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When mapping from a function parameter pack to the set of function parameters it expanded to, map exactly the number of function parameters that were expanded rather than just running to the end of the instantiated parameter list. This finishes the implementation of the last sentence of C++0x [temp.deduct.call]p1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123213 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p1-0x.cpp
|
7d5c0c1273bdc1cb3dff1cb5a62d07b1439e82c7 |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the last bullet of [temp.deduct.type]p5 and part of the last sentence of [temp.deduct.call]p1, both of which concern the non-deducibility of parameter packs not at the end of a parameter-type-list. The latter isn't fully implemented yet; see the new FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123210 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p1-0x.cpp
emp.deduct.type/p5-0x.cpp
|
f5c65ffbd7374b6c8d9f1e361041578640cab320 |
06-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction from a call to a function template whose last parameter is a parameter pack. This allows us to form a call to, e.g., template<typename ...Args1, typename ...Args2> void f(std::pair<Args1, Args2> ...pairs); given zero or more instances of "pair". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122973 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p1-0x.cpp
|
6e4e17de3df88ead7eaf51b3503a6be1718438c0 |
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a thinko in a helper routine for template argument deduction that caused an assertion when dealing with non-type template parameter packs. Add some tests for deduction and instantiation of non-type template parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122534 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p9-0x.cpp
|
7b976ece336d209977b25b5c28ee09c2d2146e6a |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement the rest of C++0x [temp.deduct.type]p9, which specifies that the presence of a pack expansion anywhere except at the end of a template-argument-list causes the entire template-argument-list to be a non-deduced context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122461 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p2-0x.cpp
emp.deduct.type/p9-0x.cpp
|
0d80abc3b7fb0dca26fb6b272d2c3484f86fb7e7 |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Unify the consistency checking for deduced template arguments into a single routine. Extend that routine to handle consistency checking for template argument packs, so that we can compare the deduced packs for template parameter packs across different pack expansions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122452 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p2-0x.cpp
|
053105d58552c600a2e56473592212a9bddafcd4 |
02-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction against a template-id, only keep deduction results for successful deductions, so that they can be compared against each other. Fixes PR8462, from Richard Smith! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117983 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
7e010a04fef171049291d8cb3047f118566da090 |
31-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function type, instantiate the return type before instantiating the parameters. In a perfect world, this wouldn't matter, and compilers are free to instantiate in any order they want. However, every other compiler seems to instantiate the return type first, and some code (in this case, Boost.Polygon) depends on this and SFINAE to avoid instantiating something that shouldn't be instantiated. We could fight this battle, and insist that Clang is allowed to do what it does, but it's not beneficial: it's more predictable to instantiate this way, in source order. When we implement late-specified return types, we'll need to instantiate the return type last when it was late-specified, hence the FIXME. We now compile Boost.Polygon properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112561 91177308-0d34-0410-b5e6-96231b3b80d8
finae-1.cpp
|
75f21af57f3dce1577d6c27bbe7bb45b49ced732 |
30-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Perform the function-to-pointer adjustment during template argument deduction where the parameter is a function reference, function pointer, or member function pointer and the argument is an overloaded function. Fixes <rdar://problem/8360106>, a template argument deduction issue found by Boost.Filesystem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112523 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p6.cpp
|
ec20f46740a59758b12c22108002395bcf5b6f9b |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When printing an overload candidate that failed due to SFINAE, print a specific message that includes the template arguments, e.g., test/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template ignored: substitution failure [with T = int *] typename T::type get_type(const T&); // expected-note{{candidate ... ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103348 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p17.cpp
|
a18592ec62e898aed7ed71e1f09c314590ce9ec7 |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When template argument deduction fails because the call had too many/too few arguments, use the same diagnostic we use for arity mismatches in non-templates (but note that it's a function template). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103341 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p17.cpp
|
a933319ebf754396623165f9dc0a29c2a48879f5 |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When printing a non-viable overload candidate that failed due to conflicting deduced template argument values, give a more specific reason along with those values, e.g., test/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long') const T& min(const T&, const T&); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103339 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/basic.cpp
emp.deduct.call/p6.cpp
|
02024a9f0d8e6c898de276193af604c42ee41269 |
28-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
After performing template argument deduction for a function template, check deduced non-type template arguments and template template arguments against the template parameters for which they were deduced, performing conversions as appropriate so that deduced template arguments get the same treatment as explicitly-specified template arguments. This is the bulk of PR6723. Also keep track of whether deduction of a non-type template argument came from an array bound (vs. anywhere else). With this information, we enforce C++ [temp.deduct.type]p17, which requires exact type matches when deduction deduces a non-type template argument from something that is not an array bound. Finally, when in a SFINAE context, translate the "zero sized arrays are an extension" extension diagnostic into a hard error (for better standard conformance), which was a minor part of PR6723. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99734 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.type/p17.cpp
|
4a0bac96103ba9f1528e91a26c0be457d39cec0f |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Add tests for PR6707. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99613 91177308-0d34-0410-b5e6-96231b3b80d8
9.cpp
|
1a6e03457ebafd6ac523cdcf5d6b6f411ea08772 |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate change to non-type template arguments of integral type, so that we extend/truncate then correct the sign to convert the non-type template argument to the template parameter's type. Previously, we reported an error when the non-type template argument was out of range; now we just warn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99600 91177308-0d34-0410-b5e6-96231b3b80d8
9.cpp
|
0d4fd8ef35ecd73ce6388cb5a6fdcfb15171f5aa |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert attempted fix for integral template arguments. It seems to have broken tramp3d-v4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99583 91177308-0d34-0410-b5e6-96231b3b80d8
9.cpp
|
684d096c204c5eef29c10777bce890400d235d8c |
25-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Warn when the conversion of an integral non-type template argument to the type of its corresponding non-type template parameter changes the value. Previously, we were diagnosing this as an error, which was wrong. We give reasonably nice warnings like: test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template argument value '256' truncated to '0' for template parameter of type 'unsigned char' Overflow<256> *overflow3; // expected-warning{{non-type template ... ^~~ test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is declared here template<unsigned char C> struct Overflow; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99561 91177308-0d34-0410-b5e6-96231b3b80d8
9.cpp
|
0519fe2e11ae60d297b50f5497761045783f79c7 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
FIXME complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95059 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p6.cpp
|
5920dbba965a2f2a963313d94be3ff3d2b67ece7 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic used when an incompatible overload set is passed as an argument during overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95057 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p6.cpp
|
eff92135d32039c9874dc356f3e93143af6069c1 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Implement C++ [temp.deduct.call]p6, template argument deduction for overloaded arguments. Fix a bug where incomplete explicit specializations were being passed through as legitimate. Fix a bug where the absence of an explicit specialization in an overload set was causing overall deduction to fail. Fixes PR6191. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95052 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p6.cpp
|
342fec43c515184a3c0d0600323dfec2b059e74e |
01-Feb-2010 |
John McCall <rjmccall@apple.com> |
Note that an overload candidate was non-viable because template argument deduction failed. Right now there's a very vague diagnostic for most cases and a good diagnostic for incomplete deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94988 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/basic.cpp
|
21714013498fd84a6e8d5ceb1af5d14b6531cfb5 |
06-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Add test from PR5913, which has already been fixed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92863 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
442471309fa97348f849687a6a8ef4acc3bc2c1f |
04-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure to use ASTContext::getAs*ArrayType() when decomposing array types. Fixes APFloat.cpp compilation failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92523 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
578b69b186d9cba0a6ae1dd7f4c04cd6a49f0aac |
16-Dec-2009 |
John McCall <rjmccall@apple.com> |
Introduce a centralized routine in Sema for diagnosing failed lookups (when used as expressions). In dependent contexts, try to recover by doing a lookup in previously-dependent base classes. We get better diagnostics out, but unfortunately the recovery fails: we need to turn it into a method call expression, not a bare call expression. Thus this is still a WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91525 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/basic.cpp
|
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 |
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. - 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
finae-1.cpp
emp.deduct.call/basic.cpp
emp.deduct.call/p2.cpp
emp.deduct.call/p3.cpp
emp.deduct.conv/p2.cpp
emp.deduct.conv/p3.cpp
emp.deduct.conv/p4.cpp
emp.deduct.funcaddr/p1.cpp
emp.deduct.partial/p11.cpp
|
4a5c15f75f76b95e1c2ceb6fa2737dcadd5f4be1 |
01-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template argument deduction in the case where the parameter type is a template-id (e.g., basic_ostream<CharT, Traits>) and the argument type is a class that has a derived class matching the parameter type. Previously, we were giving up on template argument deduction too early. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83177 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
e73bb60de3c7c60453a86e097fc428d1cd367a42 |
14-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor MarkDeductedTemplateParameters into MarkUsedTemplateParameters, which is able to mark template parameters used within non-deduced contexts as well as deduced contexts. Use this to finish the implementation of [temp.deduct.partial]p11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81794 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.partial/p11.cpp
|
1282029f3d37f482bbba3c38ea9da17a78d11d40 |
14-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Tighten up checking of non-dependent arguments as part of template argument deduction. This fixes the new test case (since partial ordering does not have a "verify the results of deduction" step), and will allow failed template argument deductions to return more quickly for, e.g., matching class template partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81779 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.partial/p11.cpp
|
d83d04041f64a2c89123d227fa8003b482391279 |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement delayed parsing for member function templates. Fixes PR4608. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79709 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.conv/p4.cpp
|
65ec1fda479688d143fe2403242cd9c730c800a1 |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement conversion function templates, along with the ability to use template argument deduction from a conversion function (C++ [temp.deduct.conv]) with implicit conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79693 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.conv/p2.cpp
emp.deduct.conv/p3.cpp
emp.deduct.conv/p4.cpp
|
bc0a2226c7fcd18b29b6846049e2cfcb872d3593 |
27-Jul-2009 |
Owen Anderson <resistor@mac.com> |
Update for LLVM API change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77249 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.funcaddr/p1.cpp
|
83314aa1cf61ed2458a8a20c83b2d4708192d5dc |
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction when taking the address of a function template. Most of the change here is in factoring out the common bits used for template argument deduction from a function call and when taking the address of a function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75044 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.funcaddr/p1.cpp
|
de0cb8b6c15c756e14b0716bebd40f4ce48ee717 |
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template argument deduction from a call. In particular, implement C++ [temp.deduct.call]p3b3, which allows a template-id parameter to match a derived class of the argument, while deducing template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74965 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
41e8c21eb41fca41e2e065e75f01433427858c19 |
02-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix RUN line so this test doesn't hang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74719 91177308-0d34-0410-b5e6-96231b3b80d8
finae-1.cpp
|
cca9e9674a5e50a283185d8e9d8a5c3414eb008e |
02-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of more information within the template instantiation stack, e.g., by distinguishing between substitution that occurs for template argument deduction vs. explicitly-specifiad template arguments. This is used both to improve diagnostics and to make sure we only provide SFINAE in those cases where SFINAE should apply. In addition, deal with the sticky issue where SFINAE only considers substitution of template arguments into the *type* of a function template; we need to issue hard errors beyond this point, as test/SemaTemplate/operator-template.cpp illustrates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74651 91177308-0d34-0410-b5e6-96231b3b80d8
finae-1.cpp
|
508f1c889b9833903ea394034fe0246d3a57a32d |
27-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
During template argument deduction from a function call, allow deduction from pointer and pointer-to-member types to work even in the presence of a qualification conversion (C++ [temp.deduct.type]p3 bullet 2). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74354 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
8a5cb1196ee8491570160e36c216631df3a9e95c |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
A little template argument deduction test uncovered an "oops". As part of template instantiation, we were dropping cv-qualifiers on the instantiated type in a few places. This change reshuffles the type-instantiation code a little bit so that there's a single place where we add qualifiers to the instantiated type, so that we won't end up with this same bug in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74331 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p3.cpp
|
f670c8cfa58b4c224eb8fb566130dc47844dd3de |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Template argument deduction is no longer responsible for checking non-dependent parameter types. Instead, class template partial specializations perform a final check of all of the instantiated arguments. This model is cleaner, and works better for function templates where the "final check" occurs during overload resolution. Also, cope with cv-qualifiers when the parameter type was originally a reference type, so that the deduced argument can be more qualified than the transformed argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74323 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/basic.cpp
|
500d331eade2f5070b66ba51d777224f9fda6e1d |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template argument deduction for reference parameters when deducing template arguments from a function call. Plus, add a bunch of tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74301 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/p2.cpp
emp.deduct.call/p3.cpp
|
e53060fa78ad7e98352049f72787bdb7543e2a48 |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Improved semantic analysis and AST respresentation for function templates. For example, this now type-checks (but does not instantiate the body of deref<int>): template<typename T> T& deref(T* t) { return *t; } void test(int *ip) { int &ir = deref(ip); } Specific changes/additions: * Template argument deduction from a call to a function template. * Instantiation of a function template specializations (just the declarations) from the template arguments deduced from a call. * FunctionTemplateDecls are stored directly in declaration contexts and found via name lookup (all forms), rather than finding the FunctionDecl and then realizing it is a template. This is responsible for most of the churn, since some of the core declaration matching and lookup code assumes that all functions are FunctionDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74213 91177308-0d34-0410-b5e6-96231b3b80d8
emp.deduct.call/basic.cpp
|