[PATCH] D87395: Sema: add support for `__attribute__((__swift_objc_members__))`
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 10 04:22:42 PDT 2020
gribozavr2 added inline comments.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:3386-3388
+The ``swift_objc_members`` attribute maps to the ``@objcMembers`` Swift
+attribute, which indicates that Swift members of this class, its subclasses, and
+all extensions thereof, will implicitly be exposed back to Objective-C.
----------------
================
Comment at: clang/test/SemaObjC/attr-swift_objc_members.m:4
+#if !__has_attribute(swift_objc_members)
+#error cannot verify precense of swift_objc_members attribute
+#endif
----------------
================
Comment at: clang/test/SemaObjC/attr-swift_objc_members.m:19
+extern void f(void);
+// expected-error at -2 {{'swift_objc_members' attribute only applies to Objective-C interfaces}}
----------------
Please also add a test for (erroneously) passing arguments to the attribute.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87395/new/
https://reviews.llvm.org/D87395
More information about the cfe-commits
mailing list