[PATCH] Create calling convention AttributedType sugar nodes
John McCall
rjmccall at apple.com
Fri Jul 19 10:04:42 PDT 2013
On Jul 12, 2013, at 5:39 AM, Reid Kleckner <rnk at google.com> 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.
- 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?
Otherwise LGTM.
John.
More information about the cfe-commits
mailing list