ahatanak added inline comments.

================
Comment at: test/SemaObjC/boxing-illegal.m:70
+  s = @(L"abc"); // expected-error {{illegal type 'int *' used in a boxed 
expression}}
+  s = @("\pabc"); // expected-error {{illegal type 'unsigned char *' used in a 
boxed expression}}
+}
----------------
rjmccall wrote:
> I don't know what `\p` is supposed to be or why it apparently changes the 
> type of the literal to `unsigned char *`, but none of these are ordinary 
> string literals that are invalid as UTF-8.  I mean something like "\xFF", 
> which still has type `char *` but will fail to parse as UTF-8, which will 
> cause normal boxing to fail and return `nil`.
Fixed and added test cases. Boxed expressions now have to be valid UTF-8 string 
literals in order to be emitted as compile-time constants.

If the string literal in a boxed expression is an invalid UTF-8 string, should 
we reject it the same way we reject other kinds of string literals (e.g., 
UTF-16)?


Repository:
  rC Clang

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

https://reviews.llvm.org/D58729



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

Reply via email to