summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-04 17:04:30 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-04 17:04:30 +0000
commitbc76c72f9400a48f05c001f1f6c9fbee10dd50d8 (patch)
tree081b1bf36bea9ba4f4e71d89e1f8409d06009f82 /clang/lib/Parse/ParseObjc.cpp
parentbef2ee4322cdacf31e76e054f5292bf9584b3345 (diff)
downloadbcm5719-llvm-bc76c72f9400a48f05c001f1f6c9fbee10dd50d8.tar.gz
bcm5719-llvm-bc76c72f9400a48f05c001f1f6c9fbee10dd50d8.zip
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
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r--clang/lib/Parse/ParseObjc.cpp13
1 files changed, 3 insertions, 10 deletions
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<IdentifierInfo *, 12> 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);
}
OpenPOWER on IntegriCloud