[clang] add a `swift_async_name` attribute
authorAlex Lorenz <arphaman@gmail.com>
Fri, 4 Dec 2020 22:45:27 +0000 (14:45 -0800)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 4 Dec 2020 23:55:29 +0000 (15:55 -0800)
commiteddd1d192bcaf11e449b34a3a569b85eb390e4f2
tree8276c21ebf44df239abd819d7401df46e4851ef8
parent03dcd57ecf99b31021644b868cae422897d520f8
[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
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Misc/pragma-attribute-supported-attributes-list.test
clang/test/SemaObjC/attr-swift_name.m
clang/test/SemaObjCXX/attr-swift_name-cxx.mm [new file with mode: 0644]