Sema: add support for `__attribute__((__swift_objc_members__))`
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 8 Sep 2020 22:33:02 +0000 (22:33 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 14 Sep 2020 15:24:41 +0000 (15:24 +0000)
commit916b43403588a85425bbc82712427cf53ed877cc
tree87f15ad2e2d953847e4120a2e1218196722f9801
parent7526376164801cc758c94217931ab025bc226b0e
Sema: add support for `__attribute__((__swift_objc_members__))`

This adds the `__swift_objc_members__` attribute to the semantic
analysis.  It allows for annotating ObjC interfaces to provide Swift
semantics indicating that the types derived from this interface will be
back-bridged to Objective-C to allow interoperability with Objective-C
and Swift.

This is based on the work of the original changes in
https://github.com/llvm/llvm-project-staging/commit/8afaf3aad2af43cfedca7a24cd817848c4e95c0c

Differential Revision: https://reviews.llvm.org/D87395
Reviewed By: Aaron Ballman, Dmitri Gribenko
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Misc/pragma-attribute-supported-attributes-list.test
clang/test/SemaObjC/attr-swift_objc_members.m [new file with mode: 0644]