[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 19 08:11:59 PDT 2024


================
@@ -638,15 +638,15 @@ ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S,
     PDecl->setInvalidDecl();
   }
 
-  ProcessDeclAttributes(S, PDecl, FD.D);
-
   // Regardless of setter/getter attribute, we save the default getter/setter
   // selector names in anticipation of declaration of setter/getter methods.
   PDecl->setGetterName(GetterSel, GetterNameLoc);
   PDecl->setSetterName(SetterSel, SetterNameLoc);
   PDecl->setPropertyAttributesAsWritten(
                           makePropertyAttributesAsWritten(AttributesAsWritten));
 
+  ProcessDeclAttributes(S, PDecl, FD.D);
+
   if (Attributes & ObjCPropertyAttribute::kind_readonly)
     PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_readonly);
 
----------------
compnerd wrote:

Could we add a test to ensure that the attributes are applied properly?

https://github.com/llvm/llvm-project/pull/84773


More information about the cfe-commits mailing list