diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-30 17:55:29 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-30 17:55:29 +0000 |
commit | 77755a57c9e85418626ac64c0d38975d5fa9aded (patch) | |
tree | fcd05f9dd5763f0977979d53db5291b33121c306 /lib/Parse/ParseObjc.cpp | |
parent | 940ab971c580ca03da2e68ec92b9c0f7acfe6988 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index b4f417a15d..fc24327060 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/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); |