[all-commits] [llvm/llvm-project] 03dcd5: [clang] add a new `swift_attr` attribute

Alex Lorenz via All-commits all-commits at lists.llvm.org
Fri Dec 4 15:56:25 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 03dcd57ecf99b31021644b868cae422897d520f8
      https://github.com/llvm/llvm-project/commit/03dcd57ecf99b31021644b868cae422897d520f8
  Author: Alex Lorenz <arphaman at gmail.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/lib/Sema/SemaDeclAttr.cpp
    A clang/test/AST/attr-swift_attr.m
    A clang/test/SemaObjC/validate-attr-swift_attr.m

  Log Message:
  -----------
  [clang] add a new `swift_attr` attribute

The swift_attr attribute is a generic annotation attribute that's not used by clang,
but is used by the Swift compiler. The Swift compiler can use these annotations to provide
various syntactic and semantic sugars for the imported Objective-C API declarations.

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


  Commit: eddd1d192bcaf11e449b34a3a569b85eb390e4f2
      https://github.com/llvm/llvm-project/commit/eddd1d192bcaf11e449b34a3a569b85eb390e4f2
  Author: Alex Lorenz <arphaman at gmail.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/Misc/pragma-attribute-supported-attributes-list.test
    M clang/test/SemaObjC/attr-swift_name.m
    A clang/test/SemaObjCXX/attr-swift_name-cxx.mm

  Log Message:
  -----------
  [clang] add a `swift_async_name` attribute

The swift_async_name attribute provides a name for a function/method that can be used
to call the async overload of this method from Swift. This name specified in this attribute
assumes that the last parameter in the function/method its applied to is removed when
Swift invokes it, as the the Swift's await/async transformation implicitly constructs the callback.

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


  Commit: db226cdf4cf91f350267da1a5b95dda42dd23413
      https://github.com/llvm/llvm-project/commit/db226cdf4cf91f350267da1a5b95dda42dd23413
  Author: Alex Lorenz <arphaman at gmail.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaDeclObjC.cpp
    A clang/test/SemaObjC/category-direct-members-protocol-conformance.m

  Log Message:
  -----------
  [objc] diagnose protocol conformance in categories with direct members
in their corresponding class interfaces

Categories that add protocol conformances to classes with direct members should prohibit protocol
conformances when the methods/properties that the protocol expects are actually declared as 'direct' in the class.

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


Compare: https://github.com/llvm/llvm-project/compare/99f79cbf31cc...db226cdf4cf9


More information about the All-commits mailing list