On Fri, Jul 19, 2013 at 1:04 PM, John McCall <[email protected]> wrote:

> On Jul 12, 2013, at 5:39 AM, Reid Kleckner <[email protected]> wrote:
> > Canonical types are unchanged.  The type printer had to be changed to
> > avoid printing any non-default implicit calling convention as well as
> > the calling convention attribute.
>
> +bool AttributedType::isCallingConv() const {
> +  switch (getAttrKind()) {
> +  default:  return false;
> +  case attr_cdecl:
> +  case attr_fastcall:
> +  case attr_stdcall:
> +  case attr_thiscall:
> +  case attr_pascal:
> +  case attr_pnaclcall:
> +  case attr_inteloclbicc:
>
> This seems to be missing the pcs attributes.  If that's intentional, there
> should be a comment.
>

Oops.  I'll make this a fully covered switch.


> -  if (handleFunctionTypeAttr(state, attr, declSpecType)) {
> -    spliceAttrOutOfList(attr, attrList);
> -    return true;
> -  }
> -
> -  return false;
> +  return handleFunctionTypeAttr(state, attr, declSpecType);
>
> This is an unexplained change.  Doesn't this cause the attribute
> to be potentially applied twice?
>

I had to apply this change in order to get one of the TypeLocBuilders to
succeed without asserting in fillAttributedType().  What might happen if
the parsed attribute stays on the declspec?


> Otherwise LGTM.
>
> John.
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to