diff options
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
| -rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 13 | 
1 files changed, 10 insertions, 3 deletions
| diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index e50f8b206779..4f51cd399c0c 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -993,6 +993,7 @@ ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc,    if (AttrList)      ProcessDeclAttributeList(TUScope, IDecl, AttrList); +  AddPragmaAttributes(TUScope, IDecl);    PushOnScopeChains(IDecl, TUScope);    // Start the definition of this class. If we're in a redefinition case, there  @@ -1176,7 +1177,8 @@ Sema::ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc,    if (AttrList)      ProcessDeclAttributeList(TUScope, PDecl, AttrList); -   +  AddPragmaAttributes(TUScope, PDecl); +    // Merge attributes from previous declarations.    if (PrevDecl)      mergeDeclAttributes(PDecl, PrevDecl); @@ -1706,7 +1708,8 @@ Sema::ActOnForwardProtocolDeclaration(SourceLocation AtProtocolLoc,      if (attrList)        ProcessDeclAttributeList(TUScope, PDecl, attrList); -     +    AddPragmaAttributes(TUScope, PDecl); +      if (PrevDecl)        mergeDeclAttributes(PDecl, PrevDecl); @@ -1805,6 +1808,7 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc,    if (AttrList)      ProcessDeclAttributeList(TUScope, CDecl, AttrList); +  AddPragmaAttributes(TUScope, CDecl);    CheckObjCDeclScope(CDecl);    return ActOnObjCContainerStartDefinition(CDecl); @@ -1954,6 +1958,7 @@ Decl *Sema::ActOnStartClassImplementation(                                        ClassName, /*typeParamList=*/nullptr,                                        /*PrevDecl=*/nullptr, ClassLoc,                                        true); +    AddPragmaAttributes(TUScope, IDecl);      IDecl->startDefinition();      if (SDecl) {        IDecl->setSuperClass(Context.getTrivialTypeSourceInfo( @@ -3043,7 +3048,7 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc,                                    ClassName, TypeParams, PrevIDecl,                                    IdentLocs[i]);      IDecl->setAtEndRange(IdentLocs[i]); -     +      PushOnScopeChains(IDecl, TUScope);      CheckObjCDeclScope(IDecl);      DeclsInGroup.push_back(IDecl); @@ -4399,6 +4404,7 @@ Decl *Sema::ActOnMethodDeclaration(      // Apply the attributes to the parameter.      ProcessDeclAttributeList(TUScope, Param, ArgInfo[i].ArgAttrs); +    AddPragmaAttributes(TUScope, Param);      if (Param->hasAttr<BlocksAttr>()) {        Diag(Param->getLocation(), diag::err_block_on_nonlocal); @@ -4429,6 +4435,7 @@ Decl *Sema::ActOnMethodDeclaration(    if (AttrList)      ProcessDeclAttributeList(TUScope, ObjCMethod, AttrList); +  AddPragmaAttributes(TUScope, ObjCMethod);    // Add the method now.    const ObjCMethodDecl *PrevMethod = nullptr; | 
