[PATCH] D84005: Introduce ns_error_domain attribute.

Michael Forster via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 27 02:32:34 PDT 2020


MForster marked an inline comment as done.
MForster added inline comments.


================
Comment at: clang/test/Sema/ns_error_enum.c:25
+
+const char *MyErrorDomain;
+typedef NS_ERROR_ENUM(unsigned char, MyErrorEnum, MyErrorDomain) {
----------------
gribozavr2 wrote:
> const char * => NSString * const? You'd need to define a fake NSString type, but that should be rather easy:
> 
> ```
> @interface NSString
> @end
> ```
> const char * => NSString * const?

Done.

Turns out that this makes the test incompatible with C and C++. Some more research makes me believe that this feature is only supposed to be used from ObjC(++). I removed the C/C++ RUN lines from this test. I will also send a follow-up change to turn this into an error in those languages. But I want to make it a separate change because of the potential for breakage in existing code.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84005





More information about the cfe-commits mailing list