summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-30 17:55:29 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-30 17:55:29 +0000
commit8c06515f2bf0807718016c8614bdf6dc27447807 (patch)
tree246268cf29c7123db9a638c174c4f9901c45b69e /clang/lib/Parse/ParseObjc.cpp
parenta80dd1cae18763c101001f3439ff204ef50f58c4 (diff)
downloadbcm5719-llvm-8c06515f2bf0807718016c8614bdf6dc27447807.tar.gz
bcm5719-llvm-8c06515f2bf0807718016c8614bdf6dc27447807.zip
Add parsing support in an Objective-C method declaration for attributes between
the return type and selector. Haven't hooked this up to Sema yet. llvm-svn: 70501
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r--clang/lib/Parse/ParseObjc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp
index b4f417a15de..fc243270604 100644
--- a/clang/lib/Parse/ParseObjc.cpp
+++ b/clang/lib/Parse/ParseObjc.cpp
@@ -677,6 +677,12 @@ 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);
OpenPOWER on IntegriCloud