[cfe-commits] [PATCH] Add smarter sorting of overload candidates that failed template deduction
Chandler Carruth
chandlerc at google.com
Fri Sep 9 11:01:04 PDT 2011
I hate to pull out the bikeshed paint... But why not!
On Fri, Sep 9, 2011 at 10:56 AM, Kaelyn Uhrain <rikka at google.com> wrote:
> I moved TDK_InvalidExplicitArguments to rank 5 and made TDK_Too*Arguments
> rank 6 since I feel it's slightly more likely that someone gave the wrong
> argument to a template than to have the wrong number of arguments (with
> candidates needing the wrong number of arguments being a more common case,
> especially candidates that are way way out in left field).
I'm not sure actually. I often leave one argument off the end of a function.
I don't think that's too unlikely.
Ah, I think I know what I really want here.
If the arguments that are specified match the parameters, but there simply
aren't enough or is one too many, I would rank that candidate before an
explicit argument mismatch.
If the arguments don't match the parameter types *and* there are too many or
not enough, I would rank that candidate after.
Is that feasible to implement?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110909/40b55109/attachment.html>
More information about the cfe-commits
mailing list