Remove support for ObjCMethodDecl attributes that appear between the
return type and the selector.  This is inconsistent with C functions
(where such attributes would be placed on the return type, not the the
FunctionDecl), and is inconsistent with what people are use to seeing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70878 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 2e0df82..6c42f42 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -677,12 +677,6 @@
   if (Tok.is(tok::l_paren))
     ReturnType = ParseObjCTypeName(DSRet);
   
-  // Parse attributes that can appear before the selector.
-  AttributeList *ReturnAttrs = 0;
-
-  if (getLang().ObjC2 && Tok.is(tok::kw___attribute)) 
-    ReturnAttrs = ParseAttributes();  
-  
   SourceLocation selLoc;
   IdentifierInfo *SelIdent = ParseObjCSelectorPiece(selLoc);
 
@@ -705,8 +699,8 @@
     Selector Sel = PP.getSelectorTable().getNullarySelector(SelIdent);
     return Actions.ActOnMethodDeclaration(mLoc, Tok.getLocation(),
                                           mType, IDecl, DSRet, ReturnType, Sel,
-                                          0, CargNames, ReturnAttrs, 
-                                          MethodAttrs, MethodImplKind);
+                                          0, CargNames, MethodAttrs,
+                                          MethodImplKind);
   }
 
   llvm::SmallVector<IdentifierInfo *, 12> KeyIdents;
@@ -779,8 +773,7 @@
                                                    &KeyIdents[0]);
   return Actions.ActOnMethodDeclaration(mLoc, Tok.getLocation(),
                                         mType, IDecl, DSRet, ReturnType, Sel, 
-                                        &ArgInfos[0], CargNames, ReturnAttrs,
-                                        MethodAttrs,
+                                        &ArgInfos[0], CargNames, MethodAttrs,
                                         MethodImplKind, isVariadic);
 }