From bc76c72f9400a48f05c001f1f6c9fbee10dd50d8 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 4 May 2009 17:04:30 +0000 Subject: 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. llvm-svn: 70878 --- clang/lib/Parse/ParseObjc.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'clang/lib/Parse/ParseObjc.cpp') diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 2e0df826bb2..6c42f429ccd 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -677,12 +677,6 @@ Parser::DeclPtrTy Parser::ParseObjCMethodDecl(SourceLocation mLoc, 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 @@ Parser::DeclPtrTy Parser::ParseObjCMethodDecl(SourceLocation mLoc, 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 KeyIdents; @@ -779,8 +773,7 @@ Parser::DeclPtrTy Parser::ParseObjCMethodDecl(SourceLocation mLoc, &KeyIdents[0]); return Actions.ActOnMethodDeclaration(mLoc, Tok.getLocation(), mType, IDecl, DSRet, ReturnType, Sel, - &ArgInfos[0], CargNames, ReturnAttrs, - MethodAttrs, + &ArgInfos[0], CargNames, MethodAttrs, MethodImplKind, isVariadic); } -- cgit v1.2.3