On Wed, Oct 22, 2014 at 12:41 PM, Aaron Ballman <[email protected]> wrote:
> On Wed, Oct 22, 2014 at 3:29 PM, Reid Kleckner <[email protected]> wrote:
>>> > Index: include/clang/Basic/Attr.td
>>> > ===================================================================
>>> > --- include/clang/Basic/Attr.td
>>> > +++ include/clang/Basic/Attr.td
>>> > @@ -1167,6 +1167,13 @@
>>> >    let Documentation = [Undocumented];
>>> >  }
>>> >
>>> > +def VectorCall : InheritableAttr {
>>> > +  let Spellings = [GCC<"vectorcall">, Keyword<"__vectorcall">,
>>> > +                   Keyword<"_vectorcall">];
>>>
>>> I can find no documentation that suggests GCC supports vectorcall. Are
>>> we sure we want those spellings?
>>
>> I think Clang should support a way of getting at this convention
>> without using -fms-extensions, and using the __attribute__ syntax
>> seems like a reasonable way to do that.
>
> Please use GNU<"vectorcall"> for that, then. GCC will add
> [[gnu::vectorcall]] in addition to __attribute__((vectorcall)), which
> is not a namespace we should be adding into (until such time as GCC
> adds this attribute, at least).

Sounds good. I guess the other conventions are supported by gcc.

>>> > -  /// \brief Checks whether the given calling convention is 
>>> > callee-cleanup.
>>> > -  inline bool isCalleeCleanup(CallingConv CC) {
>>> > +  /// \brief Checks whether the given calling convention supports 
>>> > variadic
>>> > +  /// calls. Unprototyped calls also use the variadic call rules.
>>> > +  inline bool supportsVariadicCall(CallingConv CC) {
>>>
>>> Can we make this function const while we're at it?
>>
>> Do you mean constexpr? It's not a method, so 'this' cannot be marked const.
>
> inline bool supportsVariadicCall(CallingConv CC) const;
>
> Not certain what you mean about it not being a method; that
> declaration should be legal, no?

Nope:
error C2270: 'supportsVariadicCall' : modifiers not allowed on
nonmember functions

The const after the parameter pack applies to the implicit 'this'
parameter of methods.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to