aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM with a documentation question and a testing request.



================
Comment at: clang/include/clang/Basic/AttrDocs.td:4404
+
+A context parameter must have pointer or reference type.
+  }];
----------------
Should we specify whether pointer to members or ObjC object pointers are fine 
(given that those are both somewhat "odd" pointer types)? Function pointers?

(We may want to clarify this in the other docs in a follow-up if we think this 
is unclear.)


================
Comment at: clang/test/Sema/attr-swiftcall.c:34
+
+void async_context_okay_for_now(ASYNC_CONTEXT void *context);
+void async_context_bad_type(ASYNC_CONTEXT int context) SWIFTCALL; // 
expected-error {{'swift_async_context' parameter must have pointer type; type 
here is 'int'}}
----------------
Can you also add tests that show the attribute doesn't accept any arguments and 
will error when written on the wrong subject (like a function rather than a 
parameter)?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95228/new/

https://reviews.llvm.org/D95228

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to