[PATCH] PR15291: noreturn adjustment in overload resolution for function templates

Alexander Zinenko ftynse at gmail.com
Tue Apr 16 12:46:41 PDT 2013


Hello Doug!

Thanks for the review!
Everything mentioned is fixed. Please find the updated patch attached.


On 16 April 2013 19:41, Douglas Gregor <dgregor at apple.com> wrote:

>
> On Mar 7, 2013, at 8:39 PM, Alexander Zinenko <ftynse at gmail.com> wrote:
>
> Ping?
>
>
> +bool Sema::SameTypesOrCompatibleFunctions(QualType Param,
> +                                          QualType Arg) {
>
> We're starting function names with a lowercase letter now. How about
> calling this isSameOrCompatibleFunctionType?
>
> +  if (!ParamFunction || !ArgFunction)
> +    return Param == Arg;
>
> Please change the parameters to CanQualTypes, because these == operations
> only work because we know we're getting canonical types, and that's not
> clear from the interface.
>
> +  if (IsNoReturnConversion(Param, Arg, AdjustedParam))
> +    return Arg == AdjustedParam;
>
> You'll probably need to recanonicalize AdjustedParam here.
>

> +  // TODO(ftynse): Compatible calling conventions.
> +
> Usually we just write "FIXME: what we need to fix"
>
> Otherwise, this patch looks great!
>
> - Doug
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130416/71469d5e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR15291.patch
Type: application/octet-stream
Size: 14827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130416/71469d5e/attachment.obj>


More information about the cfe-commits mailing list