aboutsummaryrefslogtreecommitdiff
path: root/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
commit1c6a3cc88177c67498fccdf14cfdf09959214e41 (patch)
tree63083f37732575f3474b4183f0318b573d8b16a4 /lib/Parse/ParseObjc.cpp
parentc6e2ab0dd61e53fa7889a4f97d74d53f4b1af278 (diff)
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
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 2e0df826bb..6c42f429cc 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/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);
}