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

Egor Zhdan via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 20 08:43:10 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);
 
----------------
egorzhdan wrote:

We have a test for this in this PR, `properties.m` – that's how I discovered this :)

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


More information about the cfe-commits mailing list