Calling convention attributes notionally appertain to the function type -- they modify the mangling of the function, change the behavior of assignment operations, etc. However, they're not currently allowed to be written in the type position within a function declaration. This patch allows the calling convention attributes to be written in the type position as well as the declaration position. This also adds a new diagnostic to diagnose this as being incompatible with GCC despite the attribute being in the gnu namespace. I do not think this incompatibility is sufficient to warrant adding a clang namespace for the attributes, but that is another option available to us if there is concern over the incompatibility.
Eventually, I would like to extend this to other attributes that really should be type attributes, such as enable_if. The calling convention attributes just happen to be the lowest hanging fruit.