diff options
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/Basic/Attr.td | 4 | ||||
-rw-r--r-- | clang/include/clang/Basic/DiagnosticParseKinds.td | 2 | ||||
-rw-r--r-- | clang/include/clang/Parse/Parser.h | 3 | ||||
-rw-r--r-- | clang/include/clang/Sema/Sema.h | 14 |
4 files changed, 15 insertions, 8 deletions
diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index 091e0a5a2c3..c9086ee22b3 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -419,6 +419,10 @@ def SubjectMatcherForObjCCategory : AttrSubjectMatcherRule<"objc_category", [ObjCCategory]> { let LangOpts = [ObjC]; } +def SubjectMatcherForObjCImplementation : + AttrSubjectMatcherRule<"objc_implementation", [ObjCImpl]> { + let LangOpts = [ObjC]; +} def SubjectMatcherForObjCMethod : AttrSubjectMatcherRule<"objc_method", [ObjCMethod], [ AttrSubjectMatcherSubRule<"is_instance", [ObjCInstanceMethod]> diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td b/clang/include/clang/Basic/DiagnosticParseKinds.td index 5ddae84cae3..84c24836f7d 100644 --- a/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -433,7 +433,7 @@ def err_objc_expected_property_attr : Error<"unknown property attribute %0">; def err_objc_properties_require_objc2 : Error< "properties are an Objective-C 2 feature">; def err_objc_unexpected_attr : Error< - "prefix attribute must be followed by an interface or protocol">; + "prefix attribute must be followed by an interface, protocol, or implementation">; def err_objc_postfix_attribute : Error < "postfix attributes are not allowed on Objective-C directives">; def err_objc_postfix_attribute_hint : Error < diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index d8f6c720b49..c77011d759c 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -1573,7 +1573,8 @@ private: ObjCImplParsingDataRAII *CurParsedObjCImpl; void StashAwayMethodOrFunctionBodyTokens(Decl *MDecl); - DeclGroupPtrTy ParseObjCAtImplementationDeclaration(SourceLocation AtLoc); + DeclGroupPtrTy ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, + ParsedAttributes &Attrs); DeclGroupPtrTy ParseObjCAtEndDeclaration(SourceRange atEnd); Decl *ParseObjCAtAliasDeclaration(SourceLocation atLoc); Decl *ParseObjCPropertySynthesize(SourceLocation atLoc); diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 71b08e36beb..41f331ca789 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -8105,17 +8105,19 @@ public: const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList); - Decl *ActOnStartClassImplementation( - SourceLocation AtClassImplLoc, - IdentifierInfo *ClassName, SourceLocation ClassLoc, - IdentifierInfo *SuperClassname, - SourceLocation SuperClassLoc); + Decl *ActOnStartClassImplementation(SourceLocation AtClassImplLoc, + IdentifierInfo *ClassName, + SourceLocation ClassLoc, + IdentifierInfo *SuperClassname, + SourceLocation SuperClassLoc, + const ParsedAttributesView &AttrList); Decl *ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, - SourceLocation CatLoc); + SourceLocation CatLoc, + const ParsedAttributesView &AttrList); DeclGroupPtrTy ActOnFinishObjCImplementation(Decl *ObjCImpDecl, ArrayRef<Decl *> Decls); |