1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @interface NSString @end
5 @interface NSString (NSStringExtensionMethods)
6 + (id)stringWithUTF8String:(const char *)nullTerminatedCString;
9 extern char *strdup(const char *str);
11 id constant_string() {
12 return @("boxed constant string.");
16 return @(strdup("boxed dynamic string"));
19 id const_char_pointer() {
20 return @((const char *)"constant character pointer");
23 id missing_parentheses() {
24 return @(5; // expected-error {{expected ')'}} \
25 // expected-note {{to match this '('}}
31 bar(@{p, p}); // expected-error {{expected ':'}}