Hook up Sema support for attributes on Objective-C method declarations that
appear between the return type and the selector. This is a separate code path
from regular attribute processing, as we only want to (a) accept only a specific
set of attributes in this place and (b) want to distinguish to clients the
context in which an attribute was added to an ObjCMethodDecl.
Currently, the attribute 'objc_ownership_returns' is the only attribute that
uses this new feature. Shortly I will add a warning for 'objc_ownership_returns'
to be placed at the end of a method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70504 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index d04394d..e474637 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -1071,6 +1071,9 @@
// Decl attributes - this routine is the top level dispatcher.
void ProcessDeclAttributes(Decl *D, const Declarator &PD);
void ProcessDeclAttributeList(Decl *D, const AttributeList *AttrList);
+
+ void ProcessObjCMethDeclReturnAttributeList(ObjCMethodDecl *D,
+ const AttributeList *AttrList);
void WarnUndefinedMethod(SourceLocation ImpLoc, ObjCMethodDecl *method,
bool &IncompleteImpl);
@@ -2186,6 +2189,7 @@
// from the Sel.getNumArgs().
ObjCArgInfo *ArgInfo,
llvm::SmallVectorImpl<Declarator> &Cdecls,
+ AttributeList *ReturnAttrList,
AttributeList *AttrList, tok::ObjCKeywordKind MethodImplKind,
bool isVariadic = false);