[PATCH] D116412: [Clang][Sema] Fix attribute mismatch warning for ObjC class properties

Egor Zhdan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 30 06:27:47 PST 2021


egorzhdan created this revision.
egorzhdan requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

If a class declares an instance property, and an inheritor class declares a class property with the same name, Clang Sema currently treats the latter as an overridden property, and compares the attributes of the two properties to check for a mismatch. The resulting diagnostics might be misleading, since neither of the properties actually overrides the another one.

rdar://86018435


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116412

Files:
  clang/lib/Sema/SemaObjCProperty.cpp
  clang/test/SemaObjC/class-property-inheritance.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116412.396663.patch
Type: text/x-patch
Size: 4994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211230/49020933/attachment.bin>


More information about the cfe-commits mailing list