]> granicus.if.org Git - clang/commitdiff
The __w64 attribute handler was more generically named, but only applied to __w64...
authorAaron Ballman <aaron@aaronballman.com>
Mon, 2 Dec 2013 16:17:55 +0000 (16:17 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 2 Dec 2013 16:17:55 +0000 (16:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196116 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclAttr.cpp

index d442afd9117efca1b438435dc853adab0594ae6c..1ae62ef3af007724b5cfd209ace6bee0d4f135e2 100644 (file)
@@ -3944,15 +3944,12 @@ static void handleInheritanceAttr(Sema &S, Decl *D, const AttributeList &Attr) {
                                       Attr.getAttributeSpellingListIndex()));
 }
 
-static void handlePortabilityAttr(Sema &S, Decl *D, const AttributeList &Attr) {
+static void handleWin64Attr(Sema &S, Decl *D, const AttributeList &Attr) {
   if (!checkMicrosoftExt(S, Attr))
     return;
 
-  AttributeList::Kind Kind = Attr.getKind();
-  if (Kind == AttributeList::AT_Win64)
-  D->addAttr(
-      ::new (S.Context) Win64Attr(Attr.getRange(), S.Context,
-                                  Attr.getAttributeSpellingListIndex()));
+  D->addAttr(::new (S.Context) Win64Attr(Attr.getRange(), S.Context,
+                                       Attr.getAttributeSpellingListIndex()));
 }
 
 static void handleForceInlineAttr(Sema &S, Decl *D, const AttributeList &Attr) {
@@ -4229,8 +4226,7 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
     handleInheritanceAttr(S, D, Attr);
     break;
   case AttributeList::AT_Win64:
-    handlePortabilityAttr(S, D, Attr);
-    break;
+    handleWin64Attr(S, D, Attr); break;
   case AttributeList::AT_ForceInline:
     handleForceInlineAttr(S, D, Attr);
     break;