[all-commits] [llvm/llvm-project] fda47d: [Clang][Sema] Fix attribute mismatch warning for O...

Egor Zhdan via All-commits all-commits at lists.llvm.org
Tue Jan 11 04:32:06 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fda47db8ee1d3eca8c42819cf1b65ab0ef7df7b8
      https://github.com/llvm/llvm-project/commit/fda47db8ee1d3eca8c42819cf1b65ab0ef7df7b8
  Author: Egor Zhdan <e_zhdan at apple.com>
  Date:   2022-01-11 (Tue, 11 Jan 2022)

  Changed paths:
    M clang/include/clang/AST/DeclObjC.h
    M clang/lib/AST/DeclObjC.cpp
    M clang/lib/Sema/SemaObjCProperty.cpp
    A clang/test/SemaObjC/class-property-inheritance.m

  Log Message:
  -----------
  [Clang][Sema] Fix attribute mismatch warning for ObjC class properties

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

Differential Revision: https://reviews.llvm.org/D116412




More information about the All-commits mailing list