From 8c06515f2bf0807718016c8614bdf6dc27447807 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 30 Apr 2009 17:55:29 +0000 Subject: 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 --- clang/lib/Parse/ParseObjc.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/Parse/ParseObjc.cpp') 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); -- cgit v1.2.3