[clang] [Sema] Directly use written attributes in ObjC (PR #179703)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 6 05:10:20 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- clang/include/clang/AST/DeclObjCCommon.h clang/lib/Sema/SemaObjCProperty.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index 38d112b41..0550a792f 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -593,7 +593,8 @@ ObjCPropertyDecl *SemaObjC::CreatePropertyDecl(
   // selector names in anticipation of declaration of setter/getter methods.
   PDecl->setGetterName(GetterSel, GetterNameLoc);
   PDecl->setSetterName(SetterSel, SetterNameLoc);
-  PDecl->setPropertyAttributesAsWritten((ObjCPropertyAttribute::Kind)AttributesAsWritten);
+  PDecl->setPropertyAttributesAsWritten(
+      (ObjCPropertyAttribute::Kind)AttributesAsWritten);
 
   SemaRef.ProcessDeclAttributes(S, PDecl, FD.D);
 

``````````

</details>


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


More information about the cfe-commits mailing list